Cerinta completa Sherlock Holmes suspects his archenemy Professor Moriarty is once again plotting something diabolical. Sherlock’s companion, Dr. Watson, suggests Moriarty may be responsible for MI6’s recent issues with their supercomputer, The Beast. Shortly after resolving to investigate, Sherlock receives
String Transmission
Cerinta completa Bob has received a binary string of length N transmitted by Alice. He knows that due to errors in transmission, up to K bits might have been corrupted (and hence flipped). However, he also knows that the string
Savita And Friends
Cerinta completa After completing her final semester, Savita is back home. She is excited to meet all her friends. Her friends live in different houses spread across the city. There are roads connecting the houses. The road network formed is
Sherlock and Array
Cerinta completa Watson gives Sherlock an array of integers. His challenge is to find an element of the array such that the sum of all elements to the left is equal to the sum of all elements to the right.
Square Subsequences
Cerinta completa Square Subsequences A string is called a square string if it can be obtained by concatenating two copies of the same string. For example, “abab”, “aa” are square strings, while “aaa”, “abba” are not. Given a string, how
Stone Division
Cerinta completa Consider the following game: There are two players, First and Second, sitting in front of a pile of stones. First always plays first. There is a set, , of distinct integers defined as . The players move in
Snakes and Ladders: The Quickest Way Up
Cerinta completa Markov takes out his Snakes and Ladders game, stares at the board and wonders: “If I can always roll the die to whatever number I want, what would be the least number of rolls to reach the destination?”
Running Time of Algorithms
Cerinta completa In a previous challenge you implemented the Insertion Sort algorithm. It is a simple sorting algorithm that works well with small or mostly sorted data. However, it takes a long time to sort large unsorted data. To see
Simple Game
Cerinta completa Big Cat and Little Cat love playing games. Today, they decide to play a Game of Stones, the Kitties are Coming edition. The game’s rules are as follows: The game starts with stones that are randomly divided into
Spies, Revised
Cerinta completa Two spies in a grid will have their covers blown if: They are both in the same row. They are both in the same column. They can see each other diagonally (i.e., lie in a line inclined °
