CODING
SYSTEM DESIGN
PLACEMENT PREP.
BLOG
LOGIN/REGISTER
MY ACCOUNT
LOGOUT
Traverse and print a linked list in forward and backward order
Given a linked list, write code to print the list in forward and backward order. Solution: This problem is discussed as an example in this
[…]
Find numbers with more than k-bits in their binary representations
Given an array of unsigned integers, print all the numbers that have more than k bits set in their binary representation. For example, if k
[…]
Remove all white spaces from a string
Given a string that may have white spaces, write code to remove all white spaces from than string. For example: Input String: "IT IS HOT
[…]
Difference between nodes of alternate vertical levels in a tree
The question below is given in the format in which questions are asked on coding interview Platforms like HackerRank, CodeChef, CodeJam, etc. PROBLEM STATEMENT Vertical
[…]
Rearrange the nodes of a linked list
Given a linked list, rearrange the node of the list as shown below: INPUT LIST: 1 -> 2 -> 3 -> 4 -> 5 ->
[…]
Merge alternate nodes of the two lists
We have already seen the code to merge two sorted linked list, such that the final list is also sorted. The logic and code can
[…]
Water overflowing from glass arranged in form of triangle
Glasses are arranged in the form of triangle (on top of each other) as shown below: 1 2 3 4 5 6 7 8 9
[…]
Protected: live classes
There is no excerpt because this is a protected post.
Maximum (or minimum) sum of subarray of size k
Given an array of n integers, find the sub-array of length k with maximum sum. For example, Input Array: {6, 4, 3, 5, 1, 9,
[…]
Consecutive numbers with sum equal to n
Given a positive integer n, print the consecutive numbers whose sum is equal to n. For example, n = 20 Output: 2, 3, 4, 5,
[…]
Load more