Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

Archive for February 2017

Reading SPIEGEL Plus articles

DISCLAIMER: The information below is for information purposes only. I happened to be browsing on SPIEGEL Online the other day and noticed that articles published for non SPIEGEL Plus subscribers were still partially available on the article’s page in readable form while the largest portion of the text was blurred . . . Read more

Cipher challenge

Problem statement Jack and Daniel are friends. They want to encrypt their conversation so that they can save themselves from interception by a detective agency. So they invent a new cipher. Every message is encoded to its binary representation of length . Then it is written down times, shifted by . . . Read more

Sansa and XOR

Problem statement Sansa has an array. She wants to find the value obtained by XOR-ing the contiguous subarrays, followed by XOR-ing the values thus obtained. Can you help her in this task? Note: is contiguous subarray of while is not. Input Format First line contains an integer , number of . . . Read more

Sum vs XOR

Problem Statement Given an integer, , find each such that: where denotes the bitwise XOR operator. Then print an integer denoting the total number of ‘s satisfying the criteria above. Input Format A single integer, . Constraints Output Format Print the total number of integer ‘s satisfying both of the . . . Read more

Simplified chess engine

Chess is a very popular game played by hundreds of millions of people. Nowadays, we have chess engines such as Stockfish and Komodo to help us analyze games. These engines are very powerful pieces of well-developed software that use intelligent ideas and algorithms to analyze positions and sequences of moves, . . . Read more

3Sum closest challenge

Problem statement Given an array of n integers, find three integers in such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. Sample Input S = [-1, 2, 1, -4] target . . . Read more