Code Room
CodingEasy
Question
A lakeside rental shop seats at most two people per kayak, and each kayak can carry at most limit kilograms in total. weights lists each customer's weight, and no single customer exceeds the limit. Return the minimum number of kayaks needed to get everyone on the water at once. Example: weights [70, 50, 80, 50] with limit 120 needs 3 kayaks.
Implement
min_kayaks(weights: list[int], limit: int) → intExamples
in
[[70,50,80,50],120]out3What a strong answer looks like
State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.