Saturday, November 4, 2017

Leetcode 611: Valid Triangle Number

Nov. 4, 2017

Introduction


It is the medium level algorithm. The algorithm is very challenging to lower the time complexity from O(n3) to O(n2) using two pointer techniques or binary search. The peer gave me the hint to lower the time complexity, and then I started to think about binary search with time complexity O(n2logn), and then the peer gave me hint to continue to optimize the time complexity.

Plan to write C# code and also read discussions for the algorithm in short future.




No comments:

Post a Comment