Longest Uniform Sub-String

Problem Statement Given a string, find the longest uniform sub-string in it. Return the repeating character and the number of times it repeats. Solution Let us take an example string like “abcdddss“. The question is asking us to return the longest sub-string with the same characters. In this case the longest uniform sub-string is “ddd”. […]

The Two Egg Problem

Problem Statement The two egg problem is as follows: there is a building with 100 floors. You are given 2 identical eggs. How do you use 2 eggs to find the threshold floor, where the egg will definitely break from any floor above floor N, including floor N itself. Solution Note that: Approach – 1 […]

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top