Skip to content

rlugo14/slow-loris-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Slow Loris Challenge

Imagine you own a baby Slow Loris (engl. for Plumplori). It’s tiny and because you care about its health, you weigh your new friend regularly. (Please do never pet a real Slow Loris!) Unfortunately you are a poor student and you only have an old balance with two plates suitable for placing objects to be weighed. You own different calibrated masses which can be placed on the plate to weigh the tiny loris. After you’ve weighed it, you get a smart idea for a program. So you implement an algorithm which receives the weight of the slow loris and returns the masses that need to be placed on the plates.

Objective

Your task is to write an algorithm which receives the weight of the animal and returns the different masses (gram) which are used in a List.

Szenario 1: Tiny Slow Loris

Given is a List<Integer> which includes the calibrated masses of the balance.

Your Slow Loris weighs only 145 grams.

Your function should return an List<Integer> with all needed masses to weigh the slow loris: [1, 16, 128].

Your algorithm should work with lighter and heavier slow loris as well.

About

This is a challenge proposed on the website https://platform.entwicklerheld.de to practice programming skills

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages