Longest Substring Without Repeat
Given a string s, find the length of the longest substring without repeating characters. Example Testing Input Format The first line contains an integer ‘T’ denoting...
Ceil in BST
Given a BST and a number X, find Ceil of X.Note: Ceil(X) is a number that is either equal to X or is immediately greater than X. Example 1:...
Arrays: Left Rotation
Problem A left rotation operation on an array shifts each of the array’s elements 1 unit to the left. For example, if 2 left rotations...
Maximum sum of hour glass in matrix
Problem: Given a 6 x 6 2D array, arr. An hourglass in A is a subset of values with indices facing in this pattern in...
Letter count in an infinite string
Problem: There is a string, s, of lowercase English letters that is repeated infinitely many times. Given an integer n find and print the number...
Jumping on the Clouds
Problem Solution...
Counting Valleys
Problem Solution...
Sales by Match
Problem Alex works at a clothing store. There is a large pile of socks that must be paired by color for sale.Given an array of...
A journey to learn
Few months back I bought the book ‘Cracking the Coding Interview’ by ‘Gayle Laakmann McDowell‘. The book is mainly about the interview process of top...