• 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

FizzBuzz Solution C C++

Python String and numbers

Subset Sum Problem Dynamic programming

25 horses 5 tracks Find 3 fastest puzzle

Practo Hiring Experience

Minimum insertions to form a palindrome

Sort an array according to the order defined by another array

Introduction To Number Theory ( Part 1 )

The Magic HackerEarth Nirvana solutions Hiring Challenge

Fibonacci Hashing & Fastest Hashtable

Convert number to words java

The greedy coins game Dynamic Programming

Edit Distance ( Dynamic Programming )

Possible sizes of bus to carry n groups of friends

Given array of 0’s and 1’s. All 0’s are coming first followed by 1’s. find the position of first 1

Find the smallest window in a string containing all characters of another string

Convert Decimal to Roman numbers / Romanizer HackerEarth Code

Binary Tree Isomorphic to each other

Linked List V/S Binary Search Tree

SAP Off Campus Hiring_ March 2015 Computer Skills

Binary Tree in Java

Regular Expression Matching

Reverse a Linked List in groups of given size

Leetcode: Edit Distance

Sort Stack in place

Check Binary Tree is Binary Search Tree or not

Naurki.com Security Breach

Walmart Labs Interview Experience

Trie Dictionary

Maximum sum contiguous subarray of an Array

Copyright © 2025 · Genesis Framework · WordPress · Log in