Hoarding programming problems for you!

Looking for good programming challenges?

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

Archive for June 2017

Zero-sum triplets challenge

Problem statement Given an array of distinct elements find all triplets in array whose sum is equal to . Sample input

Sample output

Solution We will solve this algorithm in time using hashing. The first iteration will be over all elements of our array. Let that elements be . . . Read more

Longest substring without repeating characters challenge

Problem statement Given a string, find the length of the longest substring without repeating characters. Examples Example 1 Given abcabcbb, the answer is abc, which the length is . Example 2 Given bbbbb, the answer is b, with the length of . Example 3 Given pwwkew, the answer is wke, . . . Read more

Marc’s Cakewalk challenge

Problem statement Marc loves cupcakes, but he also likes to stay fit. He eats cupcakes in one sitting, and each cupcake has a calorie count, . After eating a cupcake with calories, he must walk at least (where is the number cupcakes he has already eaten) miles to maintain his . . . Read more