• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to secondary sidebar

GoHired

Interview Questions asked in Google, Microsoft, Amazon

Join WeekEnd Online Batch from 4-April-2020 on How to Crack Coding Interview in Just 10 Weeks : Fees just 20,000 INR

  • Home
  • Best Java Books
  • Algorithm
  • Internship
  • Certificates
  • About Us
  • Contact Us
  • Privacy Policy
  • Array
  • Stack
  • Queue
  • LinkedList
  • DP
  • Strings
  • Tree
  • Mathametical
  • Puzzles
  • Graph

Array

Find Nearest Minimum number in left side in O(n)

May 15, 2016 by Dhaval Dave

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[] = {1, 6, 4, 10, 2, 5}
Output:         {-1, 1, 
… Read More

Filed Under: Adobe Interview Questions, Amazon Interview Question, Flipkart Interview Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Array, Stack

Calculate price of parking from parking start end time prices

January 5, 2016 by Dhaval Dave

Given a price rules of parking and start time and end time of parking. Calculate the price

(Below is the table of price rule) Come up with data structure you can store these price rules

… Read More

Filed Under: Amazon Interview Question, Interview Questions, problem Tagged With: Array

There are N nuts and N bolts, u have to find all the pairs of nuts and bolts in minimum no. of iteration

April 27, 2015 by Dhaval Dave

With First look you think practical way of solving this question, and that is randomly taking a bolt and finding (by Looking at all nuts) perfect fit nut for it.
but does such logic to … Read More

Filed Under: Adobe Interview Questions, Interview Questions, problem Tagged With: Array, Hashmap

Print Power Set of a Set

April 18, 2015 by Dhaval Dave

Print Power Set of a Set of character.

Power Set Power set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then P(s) =

… Read More

Filed Under: Adobe Interview Questions, Hacker Earth Questions, Interview Questions, problem Tagged With: Array, Recursion, string

Stock Buy Sell to Maximize Profit

April 18, 2015 by Dhaval Dave

Stock Price on each day is given in an array.
Example : [ 10, 12, 7, 5, 9, 15, 13, 18 ] Find the max profit that you can make by buying and selling in … Read More

Filed Under: Amazon Interview Question, Hacker Earth Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Array

Maximum difference between two elements s.t larger element appears after the smaller number

April 15, 2015 by Dhaval Dave

Find maximum profit if you can buy & sell share just once.

Given an array of integers, find out the difference between any two elements such that larger element appears after the smaller number.

Examples: … Read More

Filed Under: Adobe Interview Questions, Amazon Interview Question, Interview Experience, Microsoft Interview Questions, problem Tagged With: Array

Find the element that appears once others appears thrice

January 27, 2015 by Dhaval Dave

Given an array where every element occurs three times, except one element which occurs only once. Find the element that occurs once.
Expected time complexity is O(n) and O(1) extra space.
Examples:
Input: arr[] =
… Read More

Filed Under: Amazon Interview Question, Interview Questions, Microsoft Interview Questions, problem Tagged With: Array, Bit Arithmeticm

Check if an array has duplicate numbers in O(n) time and O(1) space

January 8, 2015 by Dhaval Dave

We have array  a[ ]= {1, 2, 3, 4, 5, 6, 7, 8, 4, 10};
And we need to find a number which is duplicate in O(n) and Space complexity O(1)

Method 1 ) Sorting

… Read More

Filed Under: Adobe Interview Questions, Interview Questions, problem Tagged With: Array

Longest Increasing Subsequence

December 22, 2014 by Dhaval Dave

The longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order.For example, length of LIS
… Read More

Filed Under: Amazon Interview Question, Flipkart Interview Questions, Hacker Earth Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Array, Dynamic Programming

Maximum of all subarrays of size k

December 20, 2014 by Dhaval Dave

Given an array and an integer k, find the maximum for each and every contiguous subarray of size k.
Input :
arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}
k = 3
… Read More

Filed Under: Flipkart Interview Questions, Microsoft Interview Questions, problem Tagged With: Array

  • « Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Next Page »

Primary Sidebar

Join WeekEnd Online/Offline Batch from 4-April-2020 on How to Crack Coding Interview in Just 10 Weeks : Fees just 20,000 INR

Join WeekEnd Online/Offline Batch from 4-April-2020

WhatsApp us

Secondary Sidebar

Custom Search

  • How I cracked AMAZON
  • LeetCode
  • Adobe
  • Amazon
  • Facebook
  • Microsoft
  • Hacker Earth
  • CSE Interview

Top Rated Questions

Find an index i such that Arr [i] = i in array of n distinct integers sorted in ascending order.

Search element in a matrix with all rows and columns in sorted order

Fibonacci Hashing & Fastest Hashtable

Maximum size of square sub matrix with all 1’s in a binary matrix

Generate largest number arranging a no. of given non negative integer numbers

Wrong Directions given find minimum moves so that he can reach to the destination

Maximum path sum between two leaves

C++ OOPs Part2

Max Sum in circularly situated Values

Leetcode: Merge Intervals

Amazon Interview Experience – SDE Chennai

Check a String is SUBSEQUENCE of another String Find Minimum length for that ( DNA Matching )

Apriori algorithm C Code Data Mining

Mirror of Tree

Advanced SQL Injection

Puzzle : 100 doors in a row Visit and Toggle the door. What state the door will be after nth pass ?

LeetCode : Word Search

The greedy coins game Dynamic Programming

Diagonal Traversal of Binary Tree

Convert number to words java

LeetCode: Binary Tree Maximum Path Sum

Templates in C++

Top 10 Interviews Techniqes for Campus Interview in IIT NIT BITS for MTech

N Petrol bunks or City arranged in circle. You have Fuel and distance between petrol bunks. Is it possible to find starting point so that we can travel all Petrol Bunks

Facebook Interview Question : Interleave List

The Magic HackerEarth Nirvana solutions Hiring Challenge

Print all nodes that are at distance k from a leaf node

Serialise Deserialise N-ary Tree

Reliance Jio Software Developer Interview Experience

Sort an array according to the order defined by another array

Copyright © 2025 · Genesis Framework · WordPress · Log in