Skip to content

Category Archives: Arrays

Given two sorted arrays A and B, generate all possible arrays such that first element is taken from A then from B then from A… Read More
Given two unsorted arrays of the same size, write a function that returns true if two arrays are permutations of each other, otherwise false. Examples: … Read More
Given a number n, find count of all numbers from 1 to n that have 4 as a digit. Examples : Input: n = 5… Read More
How to design a system that takes big URLs like “https://www.geeksforgeeks.org/count-sum-of-digits-in-numbers-from-1-to-n/” and converts them into a short 6 character URL. It is given that URLs… Read More
Given a number n, find sum of digits in all numbers from 1 to n. Examples:  Input: n = 5 Output: Sum of digits in numbers… Read More
Given an unsorted array of n integers which can contain integers from 1 to n. Some elements can be repeated multiple times and some other… Read More
Given an infinite stream of integers, find the k’th largest element at any point of time.Example:  Input: stream[] = {10, 20, 11, 70, 50, 40,… Read More
Given an array of integers, find the nearest smaller number for every element such that the smaller element is on left side. Examples: Input: arr[]… Read More
Snapdeal interview experience for Software Engineer position: Round 1: Simulation round Ques: Develop REST API for adding, fetching, updating and deleting a bookmark. Developed API… Read More
I got a chance to participate in walk-in drive at Paytm Headquarters. Went through the following process. Written test: It contained 20 objective questions having… Read More
Recently, I was interviewed for Amazon SDE-1 Position. There were two telephonic rounds followed by 4 F2F rounds. Telephonic Round 1 : ————————— He seemed… Read More
1. Machine Coding: Two players, two field; and have multiple ships located in their fields. They are guessing each others ship position and hitting. Tell… Read More
I was recently interviewed for SDE 2 position at OlaCabs. Round 1 (around 1 hour) Design and implement a logging library. Preferred language was Java.… Read More
  An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and… Read More
Round 1 1) There are M chocolate packets each packet can have variable number of chocolates in each packet. There are N students (N <… Read More