Pregunta de entrevista de Amazon

Maximum Contiguous Subarray Problem(kadane's algorithm ) Find all the leaves of BST .