## Recent Interview Questions

- 0of 0 votes
I want to implement a simple HTTP Denial-of-Service protection. There are clients that can send HTTP request to a Server (i.e. a GET Method of http://10.1.1.2:8080/?clientId=7)

if in an interval of 10 seconds more then 10 request comes from a specific client the 11th, 12th.. requests will get blocked. until 10 seconds from the first request will pass and then a new time windows of 10 seconds will be open. the idea is no more than 10 requests per 10 secs.

The time frame starts on each client’s first request and ends 10 seconds later.

I want to implement this logic on the server. Which data structures/collection/custom made object would you build to implement such a logic...

it is also important to have a threats safe solution.. and performances is also a factor here..

Thanks.

- 0of 0 votes
What are common table expressions? How are they different than temporary tables?

- 0of 0 votes
Write query to find second highest salary? Provide different queries to find using sql.

- 0of 0 votes
What is the difference between Interface and abstract classes? Give practical example from experience.

- 0of 0 votes
What are event emitters?

- 0of 0 votes
`Given a string “SELECT c1,… FROM (SELECT c2,… FROM (…) WHERE c2=v2,…) WHERE c1=v1,…”, format to the following by inserting "\n" and "\t": “SELECT c1,… FROM ( SELECT c2,… FROM ( … ) WHERE c2=v2,… ) WHERE c1=v1,…`

- 1of 3 votes
How do find out the top trendings products on a last hour/day/monthly basis?

Given that we have access to a real-time stream of sold product ids.

- -1of 1 vote
How to add chat plug in in any website

- 5of 5 votes
Give an array A of n integers where 1 <= a[i] <= K.

Find out the length of the shortest sequence that can be constructed out of numbers 1, 2, .. k that is NOT a subsequence of A.

eg. A = [4, 2, 1, 2, 3, 3, 2, 4, 1], K = 4

All single digits appears. Each of the 16 double digit sequences, (1,1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2) ... appears. Because (1, 1, 2) doesn't appear, return 3.

- 0of 0 votes
# Given a set of strings, print them in Lexicographic order (dictionary/alphabetical order)

# Example,

# Input:

# “ABCDEF”, “AA”, “BEF”, “A”, “AABB”

# Output:

# “A”, “AA”, “AABB”, “ABCDEF”, “BEF”

- 1of 1 vote
Write a function that takes a magic number and a list of numbers. It returns true if it can insert add or subtract operations in the list of numbers to get the magic number. Otherwise, it returns false.

For example:

f(10, [1,2]) = false. There's no way to add or subtract 1 and 2 to get 10.

f(2, [1,2,3,4]) = true. 1 + 2 + 3 - 4 = 2.

f(0, []) = true

f(1, []) = false

f(1, [1]) = true

f(0, [1]) = false

- 1of 1 vote
Is there any way to find pow(a,b)mod n when b exceeds long range.

- 0of 0 votes
Given a square matrix of size n (elements of the matrix can be negative). we need to find the square submatrix with maximum sum.

- 0of 0 votes
You have been given a string and a number. You need to find the longest common suffix between string and substring(0 to number)

Example : String = "ababa"

Number is 3

Take a substring from 0 to 2 which is aba

now find the longest matching suffix between "ababa" and "aba"

- 1of 1 vote
I don't remember perfectly the question, but it was like this

Given a list of 100 songs on your cell phone, find a way for each user to hear the songs without repeating songs, you need to use an algorithm that uses shuffle for songs.

- -2of 2 votes
Are you looking for Dell Printer Support Number to solve technical problems which occur while using your Dell printer? Just make a call to Dell Printer Support Canada: 1-855-253-4222 to resolve your all technical query related to Dell printer. You can also connect with us via e-mail or live chat. Always happy to help you!

For more, info visit our website:- https://dell.printersupportnumbercanada.ca/

- 0of 2 votes
Design Amazon prime video

- -1of 1 vote
Did any one took Microsoft Online Technical Screen ?? What questions I can expect in this test ??

- 2of 2 votes
Given 2 strings representing very large numbers (these are not representable as a BigInteger or other various type) write a method for adding the two numbers and returning their sum.

- -3of 3 votes
word look up

- 0of 0 votes
Design and implement a interest matching algo, to match people according to their interests in a particular area.

Suggest a score based on their interests. And rank matchings accordingly.

- 0of 0 votes
Implement a rate-limiter-like iterator and how to improve the space complexity

Given a <Word, TimeStamp> pair data type iterator as input. Implement an iterator based on it which can ignore the item if the same word has occurred in the past 10 seconds.

My implementation is to use a HashMap to memorize the word and its latest timestamp + 10s. For each new item, it will be checked against the HashMap to see if it has duplicated word occurred in the past 10s.

The interviewer asked me how to improve the space complexity if the string value varieties are infinite. He mentioned some boundary stuff.

Could anyone share some thoughts?

- 0of 0 votes
windowing in tcp

- 0of 0 votes
stateful and stateless firewall

- 0of 0 votes
Read data from a API call that gives org structure data in JSON format and arrange that data in requested format

- 0of 0 votes
log file parsing.

- 0of 0 votes
print LinkedIn if a number is divisible by 4 and 6, Linked if it is divisible by 4 and in it is by 6.

- 0of 0 votes
You are standing in the top-left corner of n*m grid. At each step you can only move up, down, right or left. Count the number of unique paths to the bottom-right corner of the grid (paths cannot cross themselves). The interviewer suggested that a backtracking solution is not the most performant one.

- 0of 0 votes
In a Binary maze with 0 and 1, 0 is the valid cell to which we can travel and 1 means that the cell is blocked. Given source and destination. We have to find-

1. IF path exists, if yes, find shortest path.

2. If we are given a chance to toggle single cell from 1 to 0 , which cell you will toggle so that you will surely get the shortest path.

- 0of 0 votes
Round 3- Find the first duplicate occurence of a number in an array