Here is the collection of questions based on experience of interview in Oyo Rooms. Round 1: Q1. Determine if there is a subset of the given set with sum equal to given sum? Q2. Given an array of numbers arrange it in the form of a single number such that the concluded number is the … Read More →

## Flipkart Interview Questions – Set 7

Flipkart Interview Experience | 2years Experience | SDE1 (Offsite Hiring Drive) Machine Round (90mins coding + 30mins review) Design and implement a Multiple Level Cache Management System with N levels, say: L1 -> L2 -> L3 … -> LN. Each layer will store Key-Value pairs of data. Both KEY and VALUE are of type String. … Read More →

## Adobe Interview Questions – Set 5

My Interview experience with Adobe for MTS2 (~2years exp) Online Round (Java) 5 coding questions under 90 mins on Hackerrank. 1. There is a list of 20 words. 10 of them are good works, and 10 of them are bad words. Write a regex of not more than 25 characters which would tell if given … Read More →

## Print All Possible Words from Phone Digits

Print all possible words from phone number digits. This question is asked by companies like microsoft, google, facebook, Amazon. Lets see example input/output to understand this problem. For example if input number is 234, possible words which can be formed are (Alphabetical order): adg adh adi aeg aeh aei afg afh afi bdg bdh bdi … Read More →

## String Decode Problem

Problem: If a=1, b=2, c=3,….z=26. Given a string, find all possible codes that string can generate. Give a count as well as print the strings. For example: Input: “1123″. You need to general all valid alphabet codes from this string. Output List aabc //a = 1, a = 1, b = 2, c = 3 … Read More →

## Microsoft Interview Questions – Set 8 (Intern + Full Time Employee)

15 MCQs on c/c++ output based, 1 java questions was also there. F2F Interview Round 1: Q1. The interviewer first discussed about my projects, specially my data mining project. Q2. Convert a Binary Tree to Doubly Link List in place? Round 2: Q1. One DBMS query select 2nd max salary from table, Q2. OS questions … Read More →

## Amazon Interview Questions – Set 13 (On campus)

Round 1 (Online test : MCQ+Coding) -Online on Hackerrank Coding Questions: Q1. Print all possible words from phone digits? Q2. Given a matrix where elements are inserted as 1 to n in row 0, n+1 to 2n in row 1 and so on till n^2 and you traverse the matrix in spiral manner, find the … Read More →

## Euler’s Totient Function

Euler Function: In number theory, Euler’s totient function (or Euler’s phi function), denoted as φ(n) or ϕ(n), is an arithmetic function that counts the positive integers less than or equal to n that are relatively prime to n , i.e., the numbers whose GCD (Greatest Common Divisor) with n is 1. (These integers are sometimes … Read More →

## Euclid’s Algorithm (Greatest Common Divisor) – GCD

Given two non-negative integers a and b. We need to find their greatest common divisor (GCD), ie, the largest number that divides both a and b. When it is of the numbers is zero, and the other is non-zero, their greatest common divisor, by definition, it is the second number. When both numbers are zero, … Read More →

## How Long Was He Walking

Puzzle: Every day, Jack arrives at the train station from work at 5 pm. His wife leaves home in her car to meet him there at exactly 5 pm, and drives him home. One day, Jack gets to the station an hour early, and starts walking home, until his wife meets him on the road. … Read More →

## Top 10 Logic Puzzles

So you think you are clever, right? Then here is your chance to pit your brain against some of the world’s hardest logic puzzles ever created. 1. 10 identical bottles of pills We have 10 identical bottles of identical pills (each bottle contain hundred of pills). Out of 10 bottles 9 have 1 gram of … Read More →

## Count Total Set Bits in All Numbers From 1 to N

Problem: Given a positive integer n, count the total number of set bits in binary representation of all numbers from 1 to n. Examples: Input: n = 3 Output: 4 Input: n = 6 Output: 9 Input: n = 7 Output: 12 Input: n = 8 Output: 13 Solution: The solution is to run a … Read More →

## What’s going on ?