Sherlock and Squares

Cerinta completa Watson likes to challenge Sherlock’s math ability. He will provide a starting and ending value that describe a range of integers, inclusive of the endpoints. Sherlock must determine the number of square integers within that range. Note: A

Red John is Back

Cerinta completa Red John has committed another murder. This time, he doesn’t leave a red smiley behind. Instead he leaves a puzzle for Patrick Jane to solve. He also texts Teresa Lisbon that if Patrick is successful, he will turn

Robot

Cerinta completa You have two arrays of integers, and , where both have number of elements. Consider the following function: score = 0 int Go(step, energy) { if (step == N) { score += V[step]; return (score); } else {

Road Maintenance

Cerinta completa Byteland has cities (numbered from to ) and bidirectional roads. A path is comprised of or more connected roads. It is guaranteed that there is a path from any city to any other city. Steven is a road

Separate the Numbers

Cerinta completa 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

Sherlock and MiniMax

Cerinta completa Watson gives Sherlock an array of integers. Given the endpoints of an integer range, for all in that inclusive range, determine the minimum( abs(arr[i]-M) for all ) ). Once that has been determined for all integers in the

Repeated String

Cerinta completa There is a string, , of lowercase English letters that is repeated infinitely many times. Given an integer, , find and print the number of letter a‘s in the first letters of the infinite string. Example The substring