Not-Always-Three Shells And A Pea Medium

+100 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES BASH, C, C++, C# AND 21 MORE
    LANGUAGES BASH, C, C++, C#, CLOJURE, ELIXIR, ERLANG, GO, GROOVY, HASKELL, JAVA, JAVASCRIPT, JULIA, KOTLIN, NIM, PERL, PHP, PYTHON2, PYTHON, RUBY, RUST, SCALA, SWIFT, TYPESCRIPT, VB
  • TIME ~25MIN

Not-Always-Three Shells And A Pea

Challenge outline

Hello and welcome to the challenge!


Three Shells And A Pea, also known as a The Shell Game is a game where there are three shells on a playing surface and a ball placed is under one of them. The shells are quickly swapped and the goal of the game is to know where the ball is at the end of the game (read more).


In this assignment, you are given the start position of the ball and a list of all swaps and your task is to print the end position of the ball.


Important! In this task there can be 2 or more shells (not always 3).


You can solve this programming contest in Java, JavaScript, Python, C++ and many more languages. If you want, you can also take part in other April 2019 competitions. Below you can find some of them:



Have fun and good luck! :)


Did you like this challenge and would like to try your hand at some interesting big programming competitions? Check what’s all over the news in tech world in April 2019 in our article with upcoming IT Conferences, Hackathons and Online Challenges.