linusyang2016
BAN USERis this brutal force? you need to loop through all the door, right?
- linusyang2016 May 28, 2014@geekyjaks, I don't think your return statement is correct here.
- linusyang2016 May 18, 2014nharryp, if multiple elements are required here, then why just 3 tuples? It could be 4 or N tuples, right?
I agree with puneet that it is NP hard problem where all the subsets needs to be evaluated.
can you share more on how this can be solved by suffix tree?
- linusyang2016 May 13, 2014flood-fill is too time consuming here. I think, the rotation is just to multiply a rotation matrix. for scaling. it is the same. Scaling and rotation are very related to the basic geometry here, why is it relevant to the specific question?
- linusyang2016 May 13, 2014what is the logic like to reach this conclusion?
- linusyang2016 May 11, 2014in this case, I think, A[9] should be 1 because 9 has appeared once. I would think this answer is not what the interviewer is looking for.
- linusyang2016 May 11, 2014more clarifications please
- linusyang2016 May 11, 2014But this is still the additional array you are talking about. If the tree is having too many nodes, the cost will be still high.
- linusyang2016 May 10, 2014Good one. But why there is no bIndex boundary check?
- linusyang2016 May 10, 2014if two sorted list of numbers are even the algorithm even, it needs small fix here. but the overall logic is right. Thanks for sharing.
- linusyang2016 May 10, 2014not likely to be done...
- linusyang2016 May 10, 2014space complexity is too high.
- linusyang2016 May 10, 2014the delete, the time complexity is too high.
- linusyang2016 May 10, 2014
doesn't sound like O(grid size).
- linusyang2016 May 28, 2014the queue first have n^2 candidate(if all are doors). for each candidate in node, BFS will not be const time.