1038. Binary Search Tree to Greater Sum Tree Leetcode

Описание к видео 1038. Binary Search Tree to Greater Sum Tree Leetcode

Approach - apply dfs and store all the node values in a list, sort the list, apply dfs again and change the node val which is node val + elements greater than the node value which we can get from the list traversing backward until the list.get(index) is less than node value

Комментарии

Информация по комментариям в разработке