• 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

problem

Code Chef PRGIFT Solution

August 6, 2014 by Dhaval Dave

Today is chef’s friend’s birthday. He wants to give a gift to his friend. So he was desperately searching for some gift here and there.
Fortunately, he found an array a of size n lying
… Read More

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

Find and print longest consecutive number sequence in a given sequence in O(n)

August 6, 2014 by Dhaval Dave

Ex: Input: 1 2 5 3 6 8 7
    Output: 5 6 7 8

As given in Above example we need to find Longest Consecutive sequence in O(n)
I have implemented in O(n) considering by

… Read More

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

Find min element in Sorted Rotated Array (Without Duplicates)

August 4, 2014 by Dhaval Dave

Problem: Find the minimum element in a sorted and rotated array if duplicates not allowed:
Example: {3, 4, 5, 6, 7, 1, 2} output: 1

Algorithm:
This problem can be easily solved in O(n) time

… Read More

Filed Under: Amazon Interview Question, Flipkart Interview Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: Array, Binary Search

Check Binary Tree is Binary Search Tree or not

July 29, 2014 by Dhaval Dave

To search Binary Search Tree
First lets understand characteristics of BST
• The left subtree of a node contains only nodes with keys less than the node’s key.
• The right subtree of a node
… Read More

Filed Under: Interview Questions, problem Tagged With: Binary Search Tree, Binary Tree, BST, tree

Printing each word reverse in string

July 29, 2014 by Dhaval Dave

Below is the code to print each word backward
Example if Input is “This is Sparta”
Out put should be  “sihT si atrapS”


Thanks to Dhaval for suggesting this approach

#include<stdio.h>
#include<string.h>

int main()
{
… Read More

Filed Under: Adobe Interview Questions, Interview Questions, Microsoft Interview Questions, problem Tagged With: string

Find Percentage of Words matching in Two Strings

July 28, 2014 by Dhaval Dave

There are two strings s1 and s2. Find the maximum of percentage word matching from s1 to s2 and s2 to s1.
Where, percentage word matching= (Total words matched in s2/total number of words in
… Read More

Filed Under: Amazon Interview Question, Interview Questions, problem Tagged With: Dynamic Programming, string

Test Cases for Round Function

July 27, 2014 by Dhaval Dave

Write the test data for the function which takes input value as floating number and precision. It returns the output by rounding the value nearest to precision value.
e.g roundOff (3.4567,2) output will be 3.46.
… Read More

Filed Under: Flipkart Interview Questions, Interview Questions, problem Tagged With: testing

CodeChef’ RRCOPY

July 26, 2014 by Dhaval Dave

Def: 
You had an array of integer numbers. You also had a beautiful operations called “Copy-Paste” which allowed you to copy any contiguous sub-sequence of your array and paste it in any position of your
… Read More

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

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

July 20, 2014 by Dhaval Dave

A person wants to go from origin to a particular location, he can move in only 4 directions(i.e East, West, North, South) but his friend gave him a long route, help a person to find
… Read More

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

Find next greater number with same set of digits

July 20, 2014 by Dhaval Dave

Given a number n, find the smallest number that has same set of digits as n and is greater than n. If x is the greatest possible number with its set of digits, then print
… Read More

Filed Under: Amazon Interview Question, Interview Questions, problem Tagged With: algorithm, Mathematical

  • « Previous Page
  • Page 1
  • …
  • Page 7
  • Page 8
  • Page 9
  • Page 10
  • Page 11
  • Page 12
  • 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

Closed Parentheses checker

Cisco Hiring Event 21st – 22nd Feb 2015

SAP Off Campus Hiring_ March 2015 Analytical Aptitude

Knight Tour Problem (Graph – Breadth First Search)

Maximum occurred Smallest integer in n ranges

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

Python Dictionaries

Best Java Book | Top Java Programming Book for Beginners

HackeEarth Flipkart’s Drone

Flipkart SDET Interview Experience

Generate next palindrome number

VMWare SDEII Interview

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

Implement LRU Cache

K’th Largest Element in BST when modification to BST is not allowed

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

Connect n ropes with minimum cost

Urban Ladder Written Test.

simple sql injection

Number of Islands BFS/DFS

Longest Increasing Subsequence

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

Advanced SQL Injection

FizzBuzz Solution C C++

Edit Distance ( Dynamic Programming )

Practo Hiring Experience

CodeChef Code SGARDEN

Calculate price of parking from parking start end time prices

Interfaces in C++ (Abstract Classes in C++)

Find the number ABCD such that when multipled by 4 gives DCBA.

Copyright © 2025 · Genesis Framework · WordPress · Log in