## Recent Interview Questions

- 0of 0 votes
Convert Roman to integer and vice-versa

- 0of 0 votes
Print a binary tree level by level and zig zag order.

- 0of 0 votes
Give a string, finds all duplicate substrings of length k

- -2of 2 votes
Give an array such as [1,2,2,2,0] every time you can jump 1 to a [i] step,

If you can jump to 0, return false

if you go out to return true

- 0of 0 votes
A group of people goes to eat together, each pay is not the same, then after they go home later, they each use mutual transfer so that everyone pay the same money.

input is an int array that each person pay, Ask who the amount of money was paid when the transfer was done, such as B -> A $ 3, C -> A $ 1.

- 0of 0 votes
Packers and Movers in Gurgaon

- 2of 2 votes
/**

* Google

* Given a list of non-negative numbers and a target integer k,

* write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k, that is, sums up to n*k where n is also an integer.

**/

- 0of 0 votes
find the last index of the last duplicate number in a sorted array

ex

input: 1,2,5,6,6,7,9

output: 4(index)

- 0of 0 votes
Given a string, check if it is can be reorganized such that the same char is not next to each other, If possible, output a possible result

example

input: google

one possible output: gogole

- 0of 0 votes
from robot movement tell final position of robot...

testcases:

"ULDLLUDL"

"UP 2xDOWN LEFT 4xRIGHT"

- 0of 0 votes
You have a non empty binary array with value 0 and 1. You can flip either 0 or 1 bit of array to make the consecutive element same.You have to return the count of consecutive number with same digit.

Input : [ 1,0,1,0,0,0]

Output : 4

if you flip the value of 1st index to 1, you have 2 consecutive 1 and 2 consecutive 0 so total 4.

input : [0,0,0,0]

output : 3

input : [0]

output 1

there is bug in below code which i couldn't find it.`class Solution { int solution(int[] A) { int n = A.length; int result = 0; for (int i = 0; i < n - 1; i++) { if (A[i] == A[i + 1]) result = result + 1; } int r = 0; for (int i = 0; i < n; i++) { int count = 0; if (i > 0) { if (A[i - 1] != A[i]) count = count + 1; else count = count - 1; } if (i < n - 1) { if (A[i + 1] != A[i]) count = count + 1; else count = count - 1; } r = Math.max(r, count); } return result + r; } }`

- 0of 0 votes
You are given with a large paragraph and N words.

You have to find a min length subparagraph of the paragraph which contain all those N words in any order. Here length of a paragraph is the count of words in the paragraph.

- -3of 3 votes
Warning! User majia168 is posting fake interview questions!

- 0of 0 votes
Write a function that given a string would print the 'expanded' version of it.

For example a2[bc2[c]]d would print out abcccbcccd

Note:

The number before the opening and closing square brackets is the multiplier for the characters within the square brackets

Method Signature [Java]:`public String expanded(String str)`

- -2of 2 votes
what is a router? http://www.foodspotting.com/4682691

- 3of 3 votes
Amazon

Given an ArrayList of Nodes, with each Node having an ID and a parent ID, determine whether the List is given in preorder.

- 0of 0 votes
Given a non-empty string s, you may delete at most k characters. Judge whether you can make it a palindrome.

- 0of 0 votes
Given a dictionary, generate the shortest string, both palindrome and pangram.

Each word can be used only once and unlimited words can be used.

- 1of 1 vote
Give you a pattern (digit in the pattern matches the corresponding

number of letters,

letter means match the letter itself),

a string to determine whether match:

ex:

abc -> 'abc' true

'1oc3' -> 'aoczzz', 'bocabc' true

- 0of 0 votes
Custom Gus Parts & Accessories

If you are looking for the best custom guns, parts and suppressors Then, Stonefire Arms is the right place to start. With a huge selection of firearms at the best prices, you can shop for rifles, handguns and shotguns from top tier brands like; Daniel DefenseĀ®, CMC, Spikes, Magpul, BCM and many more. Browse us today for best customer services.

- 2of 2 votes
Google

Given an array a[] and an integer k, a[i] means flower at position a[i] will blossom at day i. Find the first day that there are k slots between two blooming flowers.

- 1of 1 vote
Google

Given a string that represents time like "15:31", find the next time that is formed by the numbers in the string(a number can be used more than once). For "15:31", the answer should be "15:33".

- 0of 0 votes
Find the Kth most Frequent Number in an Array.

Example:`arr[] = {1, 2, 3, 2, 1, 2, 2, 2, 3} k = 2 Result: 3 Because '3' is the second most occurring element.`

Follow up: What if the array is extremely large?

- 0of 0 votes
assuming there is a freeway, n cars on the road, each car has a different integer speed, but are in the 1-n range. Now give you an array that represents the speed of each car. The starting order of the vehicle is the order of the array, ask the final formation of several clusters, the size of each cluster is how much? It can be understood that, although the vehicle speed is different, but even behind the car faster than the previous car, because you cannot pass, the last must only travel at the speed of the previous car, which formed a cluster. For example [2,4,1,3], finally [2,4] is a cluster, [1,3] is a cluster.

Follow up is now suppose you want to add a car, the speed of the car than other large, but not sure the car's starting order, so that the final output of each possible cluster (List of List). Requirements can be adjusted and call the previous function, but can only be called once

- 0of 0 votes
There is a stream of data <Symbol, timestamp, price>, and possibly also Correction Data <Symbol, timestamp, price> and then addData (symbol, timestamp, price) and correctData , Update minPrice, maxPrice, recentPrice in these two functions.

- 0of 0 votes
Give you a bunch of data <key, value, expiredTime>, design a data structure storage.

About the idea, based on Map solution.

class NewMap {

Map <Integer, Integer> data = new HashMap <> (); // store key-value pairs

Map <Integer, Integer> expired = new HashMap <> (); // store key-expired pairs

}

Then implement the three functions get (), put (), expire ().

- 1of 1 vote
Twitter

Create a simple stack which takes a list of elements.

Each element contains a stack operator (push, pop, inc) and a value to either push/pop or two values, n and m,

which increment the bottom n values by m.

Then print the topmost value of the stack after every operation. If the stack is empty, print "empty"

- 0of 0 votes
Check if the string is a panagram & print all the missing characters if the string is not a panagram in sorted order.

- 0of 0 votes
Find the winning hand in Poker. I was given input for 2 hands(eg 6D 7D 8H 9H JS 5S 6C JH QD KC), of which I need to determine who won based on the cards & if there is a tie it should print none.

- 0of 0 votes
how to implement the standard JSON.stringify and JSON.parse method