Tech IndustryDec 10, 2018

Failed to solve a problem

Share a problem that you failed to solve in an onsite recently

Facebook asshol Dec 10, 2018

Vertical order traversal

New
V000r Dec 10, 2018

At G?

New
MSFT_fte Dec 10, 2018

Same here.

Apple yEdW78 Dec 10, 2018

Frog jump at google with optimum solution I saw it on leetcode but didn’t solve it before onsite

IBM shitstore Dec 10, 2018

LC hard. Tough luck.

Facebook :? Dec 10, 2018

I wonder if they would have let you pass with the non-optimal DP solution.

New
Driver2 Dec 10, 2018

Sorting an array such that the sum of the adjacent elements is a perfect square.

Facebook :? Dec 10, 2018

Like [-9,22,3,0,1] becomes [0,1,3,22,-9]? What if no such ordering is possible? The sum of every consecutive pair with step = 1 or 2?

Apple NjkQ45 Dec 10, 2018

It would be trivial with step=2, no?

Gusto Bnbnb Dec 10, 2018

Given a grid of letters and a dictionary, find the largest set of dictionary words appearing in the grid, such that no words overlap. I had the idea but coding it up is tricky

IBM shitstore Dec 10, 2018

Backtrack? Or something else? Very nice question

Gusto Bnbnb Dec 10, 2018

Basically you have to use two kinds of backtracking. One to find all words, and one to try all combinations of those words.

Microsoft myuter Dec 10, 2018

Runlength encoding without using extra space

Insureon ShipJumper Dec 10, 2018

Filter Fibonacci numbers from a list of non-negative integers. For example: Given [2,17,1,13,11], output: [2,1,13]. I gave an idea to solve it but couldn't complete the code.

Apple Flixer Dec 10, 2018

How to approach this ?

eBay dvgC31 Dec 10, 2018

Get all two additives for the number and recursively check if both are Fibonacci number

Oath hg Dec 10, 2018

Iterative post order binary tree traversal in 35 mins.

New
P=/=NP Dec 10, 2018

For this question, did they ask to do in O(1) space?

Facebook :? Dec 10, 2018

You can’t do it in O(1) space unless you’re doing a Morris traversal, which is kind of cheating since it modifies the tree and restores it as it goes. The typical solution for this is to use a stack and node pointer.

New
TuDV43faJ Dec 10, 2018

Level order traverser iterative

Akamai Technologies olo Dec 10, 2018

What the hell is interactive?

New
TuDV43faJ Dec 10, 2018

Means?

Google prodaccess Dec 10, 2018

P vs NP

IBM shitstore Dec 10, 2018

Kth smallest element from two sorted arrays in logarithmic time , const space

Google SuperLowTC Dec 10, 2018

Feel sorry for you. This is definitely very painful to code while making sure it works on all edges cases.

IBM shitstore Dec 10, 2018

Was asked at G phone interview. :( .