## Recent Interview Questions

- 0of 0 votes

AnswersIam trying to send the directed graph in a request payload as

- arvaithi August 06, 2018 in United States

{

"data":[

{

"source": "A", "target": "B", "distance":6

},

{

"source": "A", "target": "E", "distance":4

},

{

"source": "B", "target": "A", "distance":6

},

{

"source": "B", "target": "C", "distance":2

},

{

"source": "B", "target": "D", "distance":4

},

]

}

How can I save this in database and perform the operations as to get the shortestpath between the points(Iam using java,spring boot )| Report Duplicate | Flag | PURGE

- 0of 0 votes

AnswersIam passing directed graph as the request payload

- arvaithi August 06, 2018 in United States

{

"data":[

{

"source": "A", "target": "B", "distance":6

},

{

"source": "A", "target": "E", "distance":4

},

{

"source": "B", "target": "A", "distance":6

},

{

"source": "B", "target": "C", "distance":2

},

{

"source": "B", "target": "D", "distance":4

},

]

}

How can i save the graph in the database using java .Here Iam using spring boot| Report Duplicate | Flag | PURGE

- -1of 1 vote

AnswerBinance Support +1-800-571-6109 Binance customer service

- krakenexchange0 August 06, 2018 in United States| Report Duplicate | Flag | PURGE

247quickbookshelp Associate .Net/C - 0of 0 votes

AnswersIam passing the graph in the Post request body as

- arvaithi August 06, 2018 in United States

{

"data":[

{

"source": "A", "target": "B", "distance":6

},

{

"source": "A", "target": "E", "distance":4

},

{

"source": "B", "target": "A", "distance":6

},

{

"source": "B", "target": "C", "distance":2

},

{

"source": "B", "target": "D", "distance":4

},

{

"source": "C", "target": "B", "distance":3

},

{

"source": "C", "target": "D", "distance":1

},

]

}

How can I save the graph in the database and used it for to find the shortest path between the nodes?| Report Duplicate | Flag | PURGE

- 2of 2 votes

AnswersQuestion : Given a set of N numbers [1,N], partition them into 2 disjoint subsets based on a set of K queries.

- robb.krakow July 25, 2018 in United States

Each query is of the type (n1, n2) where n1 and n2 are distinct numbers from the set and n1 and n2

belong to opposite subsets.

Example:

Input:

Input:

N = 4

K = [(1, 2), (1, 3), (2, 4)]

Output:

Set 1 : (1,4)

Set 2 : (2,3)| Report Duplicate | Flag | PURGE

Microsoft Software Engineer Data Structures - 0of 0 votes

AnswerGiven two arrays. One is for tasks (Processes) and each element depicts the amount of cores required to run the task. 2nd array is an array of CPU where each element depicts the no of cores in it.We have to tell how many maximum number of tasks can be allocated. Example: Task: [3, 5, 7], Cores: [1, 3, 5] . Here only task 0 and 1 can be allocated to CPU 1 and 2 . So, answer=2.

- Anil Kumar July 23, 2018 in India| Report Duplicate | Flag | PURGE

Amazon SDE1 - 0of 2 votes

AnswersWhat is the best way to generate first N primes? (not primes up to N but first N primes)

- koustav.adorable July 22, 2018 in United States for Amazon Prime| Report Duplicate | Flag | PURGE

Amazon SDE-2 Algorithm - 0of 0 votes

AnswerWe are given a list of N integers and another positive integer K. We need to compute the number of ways in which the product P of the

- sowjanyanani16 July 22, 2018 in United States

given N integers can be expressed as a product of K positive integers (not

necessarily distinct). The order of the factors in the expression is not

important. For example, 1 x 2 x 3 and 2 x 3 x 1 are not counted as different

ways of expressing 6 as a product of three integers.

Input Format

The first line contains two space-separated integers, N and K

The next line contains N-space separated integers

Output

One line containing the number of ways in which the product of the N

integers can be expressed as a product of K positive integers

Example:

Input

2 3

4 16

Output

7

Explanation

The product is 64. This can be expressed as a product of three integers in

the following ways:

1 x 1 x 64

1 x 2 x 32

1 x 4 x 16

1 x 8 x 8

2 x 2 x 16

2 x 4 x 8

4 x 4 x 4| Report Duplicate | Flag | PURGE

- -3of 3 votes

AnswersCommon problems in canon printer

- salsax28594 July 21, 2018 in Australia for Technical Team| Report Duplicate | Flag | PURGE

Ask.com Technical Architect - 1of 1 vote

AnswersWhat is quirk mode in browser? What happens in quirk mode?

- Jaideep July 21, 2018 in India| Report Duplicate | Flag | PURGE

Sapient Corporation Web Developer Application / UI Design - 1of 1 vote

AnswersIn html5 how do to make Video in fullscreen mode?

- Jaideep July 21, 2018 in India| Report Duplicate | Flag | PURGE

Sapient Corporation Web Developer Application / UI Design - 0of 0 votes

AnswersFriend circle:

- Jaideep July 21, 2018 in India

There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of C, then A is an indirect friend of C. And we defined a friend circle is a group of students who are direct or indirect friends.

Given a N*N matrix M representing the friend relationship between students in the class. If M[i][j] = 1, then the ith and jth students are direct friends with each other, otherwise not. And you have to output the total number of friend circles among all the students.

Input:

[[1,1,0],

[1,1,0],

[0,0,1]]

Output: 2

Explanation:The 0th and 1st students are direct friends, so they are in a friend circle.

The 2nd student himself is in a friend circle. So return 2.

Input:

[[1,1,0],

[1,1,1],

[0,1,1]]

Output: 1

Explanation:The 0th and 1st students are direct friends, the 1st and 2nd students are direct friends,

so the 0th and 2nd students are indirect friends. All of them are in the same friend circle, so return 1.| Report Duplicate | Flag | PURGE

Sapient Corporation Web Developer - 0of 0 votes

AnswersUniversal Lucky string:

- Jaideep July 21, 2018 in India

All characters in S have the same exact frequency (i.e., occur the same number of times). For example, "aabbcc" is valid, but "baacddd" is not valid.

2. Deleting exactly 1 character from S will result in all its characters having the same frequency. For example, "aabbccc" and "aabbc" are valid because all their letters will have the same frequency if we remove occurrence of "c", but "aabbcccc" is not valid because we'd need to remove 2 characters.| Report Duplicate | Flag | PURGE

Sapient Corporation Web Developer Application / UI Design - -1of 1 vote

AnswersAre you unable to print the document after giving print command from AOL Gold? If your reply is positive then you need to check the connection of cables and internet connectivity of your device. Before checking these make sure you have to download AOL Desktop Gold from official and site have completed the installation process.

- adornasmith73 July 21, 2018 in United States

Read More:- https://www.email-customer-support.com/aol-download/| Report Duplicate | Flag | PURGE

Service Now Member Technical Staff test - -1of 1 vote

AnswersAlways install AOL Desktop Gold in your system after checking the system requirement and download the. exe file from its original website only. Make sure you have installed the latest available version. In this way, you can protect your desktop application from confronting any error or glitches be it desktop running slow or not working.

- adornasmith73 July 21, 2018 in United States

Read More:- https://www.email-customer-support.com/aol-download/| Report Duplicate | Flag | PURGE

Technical Architect test - 1of 1 vote

AnswersFind all triplet that sum to a given value in an array of integers, given that the array is too big to fit into memory

- intuiti July 19, 2018 in United States| Report Duplicate | Flag | PURGE

Google Software Engineer - 0of 0 votes

Answer**Game of Bits**

- harshit.knit July 19, 2018 in India

Yale and Xavier are playing a game with numbers. Each round of the game starts with a number given to them by Zita, Yale’s little sister.

The number n is expressed as a binary integer with p bits

For every round, Xavier gets the first move.

The game came consists of moves performed by Yale and Xavier alternately.

The mth move of the game involves performing these operations on the number:

Toggling the mth bit (numbering of bits starts from left) of the number.

Toggling the left adjacent bit of m (if such a bit exists) if it is equal to the mth bit before toggling in step 1; otherwise keep it as is.

Toggling the right adjacent bit of m (if such a bit exists) if it is equal to the mth bit before toggling in step 1; otherwise keep it as is.

This modification of the number goes on until all p moves are made. If the modified number (as a result of all the operations) is

equal (or a distance one away) from the original number, then the person who made the last move wins the round; otherwise the other one wins the round.

**Note:**

The number given to them is converted to its binary form and represented with the help of minimum number of bits.

The numbering for the bits starts from the leftmost bit.

**Constraints**

1<=r<=10^6

1<=n<=10^6, where n is the number given by Zita in any round

**Input Format**

The first line contains a number, r, denoting the number of rounds in the game.

This is followed by r lines, where the ith line contains the number given by Zita for the ith round.

**Output Format**

The output of the problem has r lines, where the ith line contains the winner of ith round as X if Xavier wins ith round or Y if Yale wins the ith round.

**Sample Input**

1

11

**Sample Output**

Y

**Explanation**

11 is represented as 1011 using minimum number of bits in binary.

When Xavier makes the first move, it becomes 0011.

Then Yale makes the 2nd move and it becomes 1111.

After the third move made by Xavier, it becomes 1000.

After the last move by Yale, it becomes 1011 which is 11 in decimal.

The last move was made Yale and the modified number is equal or adjacent to 11,

therefore, Yale wins this round.| Report Duplicate | Flag | PURGE

ThoughtWorks Software Engineer / Developer Algorithm - 0of 0 votes

AnswerI 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)

- Patrick July 18, 2018 in United States

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.| Report Duplicate | Flag | PURGE

Dropbox Software Trainee Java - 0of 0 votes

AnswersWhat are common table expressions? How are they different than temporary tables?

- Jaideep July 18, 2018 in India| Report Duplicate | Flag | PURGE

Deloitte Consulting LLP Applications Developer SQL - 0of 0 votes

AnswersWrite query to find second highest salary? Provide different queries to find using sql.

- Jaideep July 18, 2018 in India| Report Duplicate | Flag | PURGE

Deloitte Consulting LLP Applications Developer SQL - 0of 0 votes

AnswersWhat is the difference between Interface and abstract classes? Give practical example from experience.

- Jaideep July 18, 2018 in India| Report Duplicate | Flag | PURGE

Deloitte Consulting LLP Applications Developer .Net/C - 0of 0 votes

AnswersWhat are event emitters?

- Jaideep July 18, 2018 in India| Report Duplicate | Flag | PURGE

Capgemini Front-end Software Engineer Application / UI Design - 0of 0 votes

Answers

- don99492 July 16, 2018 in United States`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,…`

| Report Duplicate | Flag | PURGE

Coding - -1of 1 vote

AnswerHow to add chat plug in in any website

- zennifergeorge1 July 12, 2018 in United States| Report Duplicate | Flag | PURGE

ebiztown Consultant - 7of 7 votes

AnswersGive an array A of n integers where 1 <= a[i] <= K.

- aonecoding July 12, 2018 in United States

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.| Report Duplicate | Flag | PURGE

Google Solutions Engineer - 1of 1 vote

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

- sarunreddy82 July 11, 2018 in United States

# Example,

# Input:

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

# Output:

# “A”, “AA”, “AABB”, “ABCDEF”, “BEF”| Report Duplicate | Flag | PURGE

VMWare Inc String Manipulation - 1of 1 vote

AnswersWrite 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.

- Pedro July 11, 2018 in United States

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| Report Duplicate | Flag | PURGE

Google Software Developer - 1of 1 vote

AnswerIs there any way to find pow(a,b)mod n when b exceeds long range.

- tarunreddy1018 July 10, 2018 in United States| Report Duplicate | Flag | PURGE

- 0of 0 votes

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

- sowjanyanani16 July 10, 2018 in United States| Report Duplicate | Flag | PURGE

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window