Cerinta completa A driver is driving on the freeway. The check engine light of his vehicle is on, and the driver wants to get service immediately. Luckily, a service lane runs parallel to the highway. It varies in width along
Substring Diff
Cerinta completa In this problem, we’ll use the term “longest common substring” loosely. It refers to substrings differing at some number or fewer characters when compared index by index. For example, ‘abc’ and ‘adc’ differ in one position, ‘aab’ and
Stone Game
Cerinta completa Alice and Bob are playing the game of Nim with piles of stones with sizes . If Alice plays first, she loses if and only if the ‘xor sum’ (or ‘Nim sum’) of the piles is zero, i.e.,
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
Sherlock and The Beast
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
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?”
