Skip to content

Instantly share code, notes, and snippets.

View w3cj's full-sized avatar
🌱

CJ w3cj

🌱
View GitHub Profile
@w3cj
w3cj / robot-and-batteries.md
Created April 18, 2017 14:39 — forked from bertoort/robot-and-batteries.md
Brain Teaser Warm-Up

Problem

A robotic technology startup is located in San Francisco. The CEO has 3000 battery packs that he wants to transport with Danny (the robotic bird) to his other branch, across a 1000-kilometer stretch of land. The owner has only one robotic bird, which carries a maximum of 1000 battery packs at any moment in time, and consumes one battery pack every kilometer it travels.

Question

What is the largest number of battery packs that can be delivered to the branch?