Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Match… Read More

# Category Archives: Arrays

Given a string, find the longest substring which is palindrome. if the given string is “forgeeksskeegfor”, the output should be “geeksskeeg” if the given string… Read More

Recently Amazon came to our campus as a part of our campus recruitment. Online Round: 1) Given a linked list of zeros and ones, sort… Read More

There was 1 coding round and 4 F2F interviews. This was for Software Developer Position(Note:-It was not for the research division in Walmart Labs) Coding… Read More

We recommend reading following posts as a prerequisite of this post.K’th Smallest/Largest Element in Unsorted Array | Set 1 K’th Smallest/Largest Element in Unsorted Array |… Read More

Given an array of 0s and 1s, find the position of 0 to be replaced with 1 to get longest continuous sequence of 1s. Expected… Read More

Given an integer as input and replace all the ‘0’ with ‘5’ in the integer. Examples: Input: 102 Output: 152 Explanation: All the digits which… Read More

We recommend reading the following post as a prerequisite of this post. K’th Smallest/Largest Element in Unsorted Array | Set 1 Given an array and… Read More

Given an array and a number k where k is smaller than the size of the array, we need to find the k’th smallest… Read More

Given two sets represented by two arrays, how to check if the given two sets are disjoint or not? It may be assumed that the… Read More

My Interview Experience with One97 My Experience: 1.5+ year. I am from a premium engineering college of India. Apart from the regular job I do… Read More

Given two sorted arrays and a number x, find the pair whose sum is closest to x and the pair has an element from each… Read More

Given a sorted array and a number x, find a pair in array whose sum is closest to x.Examples: Input: arr[] = {10, 22, 28,… Read More

Screening round: Three coding question on hackerEarth to be comiled against the testcases 1. Merge two sorted linked list into single one 2. Difference between… Read More

Given an array of distinct integers, find length of the longest subarray which contains numbers that can be arranged in a continuous sequence. Examples: Input: arr[]… Read More