Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 699 Bytes

readme.md

File metadata and controls

17 lines (10 loc) · 699 Bytes

Coding Problems! Solutions in PHP

By Ariful Haque

Lesson 01: Binary Gap

Find longest sequence of zeros in binary representation of an integer.

A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N.

Lesson 02: Calculate Parking Fee

A parking garage charges a $2.00 minimum fee to park for up to three hours.

The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours.

Lesson 03: Find minimum cost of tickets

Find minimum cost of tickets required to buy for traveling on known days of the month (1...30).