Skip to content

Latest commit

 

History

History

challenge_15

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Taking Candy From A Baby

Idea

Remember cracking open a pinata on someones birthday? When all your friends would swarm the candy that fell out and you would have to fight your way through it? I do. Lotta friendships were lost at those birthday parties... Nevertheless, your job today is to simulate kids stealing candy from each other. The way this assignment goes is as follows: There are three kids, Tom, Bob and Joe. They each have varying (or the same, it's not really important) amounts of candy. Tom becomes gready as well and steels from himself because he isn't very smart.

Testing

Crate a Circularly Linked List and append various values to it. For simplicity sake, these values should be ints.

Call the function that will initialize the steeling.

Print the remaining kid.

Example

Given an array: a b c d your function should return c.