## Efficiently merging two sorted arrays with O(1) extra space

Given two sorted arrays, we need to merge them in O((n+m)*log(n+m)) time with O(1) extra space into a sorted array, when n is the size… Read More »

Given two sorted arrays, we need to merge them in O((n+m)*log(n+m)) time with O(1) extra space into a sorted array, when n is the size… Read More »

The diameter of a tree is the number of nodes on the longest path between two leaves in the tree. The diagram below shows two… Read More »

The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two leaves in the tree. The… Read More »

Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Examples: Inputs: 1->2->3->4->5->6->7->8->NULL and k… Read More »

Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be… Read More »

Given two sorted arrays, the task is to merge them in a sorted manner. Examples: Input : arr1[] = { 1, 3, 4, 5} arr2[]… Read More »

Below was my experience with Snapdeal SDET Bangalore Location. Round-1: Telephonic Interview -Skype —————————————————- Basic questions on Java (Since it was mentioned in my resume).… Read More »

I had interview at Snapdeal Gurgaon for Software Development Engineer, before that I have also completed online test from home. I am 2016 passed out… Read More »

Given a simple expression tree, consisting of basic binary operators i.e., + , – ,* and / and some integers, evaluate the expression tree. Examples:… Read More »

Given a string check if it is Pangram or not. A pangram is a sentence containing every letter in the English Alphabet. Examples : The… Read More »

Question: Design a Data Structure SpecialStack that supports all the stack operations like push(), pop(), isEmpty(), isFull() and an additional operation getMin() Practice Tags :… Read More »

Snapdeal visited our campus for recruiting software engineers for Bangalore/Gurgaon location. Selection process consists of 4 rounds. Round 1: Algorithmic coding test was conducted on… Read More »

We are given two sorted array. We need to merge these two arrays such that the initial numbers (after complete sorting) are in the first… Read More »

Given an array that represents a tree in such a way that array indexes are values in tree nodes and array values give the parent… Read More »

Given a value V, if we want to make change for V cents, and we have infinite supply of each of C = { C1,… Read More »