You need to log in or create an account to post to this user's Wall.
I added some pre-checks before the backtracking part, and now it works fine

Coyote started the forum topic Word search problem in the group Google Interview 1 year ago
I am trying to solve the “Word search” problem of the online judge.
My solution is fast enough to solve 90% of the large test, but then it times out
My algo is :
for every start position, try to find the […]I have just found a linear solution by realizing that the problem is similar to the problem of finding the minimum subset of a set of intervals to cover a given interval

Coyote started the forum topic Jump Game II in the group Google Interview 1 year ago
I am playing with the online judge, trying to solve the problem “Jump Game 2″.
I have wriiten two solutions, one with DP, one with BFS.
Both give the correct result but have a worst case of n^2, which gives me […]Coyote started the forum topic Online judje in the group Google Interview 1 year ago
It seems broken : i got only ”Internal Error”
Here is an implementation using BFS :
Dictionary is stored in a Hashtable. Start the BFS from the word A.
- dequeue a word W from the queue
- if the word is B, we are finished
- push non visited words into the […]- Coyote in the forum topic Substring with Concatenation of All Words in a List in the group Facebook Interviews
Thanks, there was an arror in my code :
instead of
It now runs in 1s
In fact the code is not O(N*M), but O(N * M * length of a word of M).
I wonder if we could do better.
Some minor improvments I can […] Coyote joined the group Amazon Interview 1 year, 2 months ago
- Coyote in the forum topic Find all duplicates in an array of size N where the values in the array can be from 0-N in the group Amazon Interview
I have coded th above solution, with two special cases : 0 because it can’t be fliped to < 0, and n because it is out of bounds.
- Coyote in the forum topic Substring with Concatenation of All Words in a List in the group Facebook Interviews
I have this O(M * N) solution but I got TLE on the online judge.
It does create a lot of String instances :/ Coyote joined the group Facebook Interviews 1 year, 2 months ago
- Coyote in the forum topic Substring with Concatenation of All Words in a List in the group Facebook Interviews
@1337c0d3r : what complexity did you get ? Can you give some hints please ?
Coyote commented on the post, A Distance Maximizing Problem 1 year, 2 months ago
The solution posted here works and is easier to understand than the one suggested in the article :
Thanks for your reply, I think I found teh solution!
Is the judge broken? I got ”Run Status: Internal Error” since Saturday :/The fact is the judge accepts the simple o(n2) solution !
Coyote started the forum topic Container with most water in the group Google Interview 1 year, 3 months ago
Does anyone know a less than O(n^2) algorithm for the ”Container with most water” problem in the Online judge ?
I can’t find another solution than brute force !Coyote joined the group Google Interview 1 year, 3 months ago
Coyote became a registered member 1 year, 3 months ago
