Skip to content
/ Boat Public

Predict the min number of boats required for people travelling together. (members in a family can't be split to different boats)

Notifications You must be signed in to change notification settings

lugar004/Boat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Boat

Predict the min number of boats required for different family travelling together. Boats have maximum limit of members allowed, members in a family should not be split. Multiple families can travel together in a boat. Boats can't be reused. XD

For Example:

Case 1. Input: limit = 3, people = [1,2] Output: 1 Explanation: 1 boat (1,2) # 2 family

Case 2. Input: limit = 3, people = [3,2,2,1] Output: 3 Explanation: 3 boats (1,2), (2) and (3) # 4 family

About

Predict the min number of boats required for people travelling together. (members in a family can't be split to different boats)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages