Рет қаралды 11,701
This video explains a very important geometric algorithm which is asked in interviews frequently which is the klee's algorithm. This algorithm is used to find the longest line which is formed by the given line segments,i.e., finding the longest length of union of segment of lines. I have explained a very specific technique which works in just O(NlogN). As usual, the CODE LINK is given below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: gist.github.com/SuryaPratapK/...