HackerLand Enterprise is adopting a new viral advertising strategy. When they launch a new product, they advertise it to exactly people on social media. On the first day, half of those people (i.e., ) like the…
When you select a contiguous block of text in a PDF viewer, the selection is highlighted with a blue rectangle. In this PDF viewer, each word is highlighted independently. For example: In this challenge, you will be…
Dan is playing a video game in which his character competes in a hurdle race. Hurdles are of varying heights, and Dan has a maximum height he can jump. There is a magic potion he can take that will increase his maximum…
Gary is an avid hiker. He tracks his hikes meticulously, paying close attention to small details like topography. During his last hike he took exactly steps. For every step he took, he noted if it was an uphill, , or a…
In this challenge, the task is to debug the existing code to successfully execute all provided test files. Given two strings consisting of digits 0 and 1 only, find the XOR of the two strings. To know more about XOR…
In this challenge, the task is to debug the existing code to successfully execute all provided test files. A number is called a smart number if it has an odd number of factors. Given some numbers, find whether they are…
Priyanka works for an international toy company that ships by container. Her task is to the determine the lowest cost way to combine her orders for shipping. She has a list of item weights. The shipping company has a…
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…
The median of a list of numbers is essentially it's middle element after sorting. The same number of elements occur after it as before. Given a list of numbers with an odd number of elements, can you find the median?…
Numeros the Artist had two lists that were permutations of one another. He was very proud. Unfortunately, while transporting them from one exhibition to another, some numbers were lost out of the first list. Can you…
Sunny and Johnny like to pool their money and go to the ice cream parlor. Johnny never buys the same flavor that Sunny does. The only other rule they have is that they spend all of their money. Given a list of prices…
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. For instance, given the array…
Dothraki are planning an attack to usurp King Robert's throne. King Robert learns of this conspiracy from Raven and plans to lock the single door through which the enemy can enter his kingdom. But, to lock the door he…
Julius Caesar protected his confidential information by encrypting it using a cipher. Caesar's cipher shifts each letter by a number of letters. If the shift takes you past the end of the alphabet, just rotate back to…
Louise joined a social networking site to stay in touch with her friends. The signup page required her to input a name and a password. However, the password must be strong. The website considers a password to be strong…
Sorting is useful as the first step in many different tasks. The most common task is to make finding things easier, but there are other uses as well. In this case, it will make it easier to determine which pair or pairs…
A numeric string, , is beautiful if it can be split into a sequence of two or more positive integers, , satisfying the following conditions: for any (i.e., each element in the sequence is more than the previous…
A weighted string is a string of lowercase English letters where each letter has a weight. Character weights are to from to as shown below: We define the following terms: The weight of a string is the sum of the weights…
Happy Ladybugs is a board game having the following properties: The board is represented by a string, , of length . The character of the string, , denotes the cell of the board. If is an underscore (i.e., _), it means…
Bob has a strange counter. At the first second, it displays the number . Each second, the number displayed by the counter decrements by until it reaches . The counter counts down in cycles. In next second, the timer…