[Programming Problem] Deepest Leaves Sum

Given a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] Output: 15 [Problem Link] Algorithm Traverse through the tree using a level variable (which tells you ...

[Programming Problem] Restore IP Addresses

Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example:   Input: "25525511135" Output: ["255.255.11.135", "255.255.111.35"]Example: Input: "25525511135" Output: ["255.255.11.135", "255.255.111.35"] Problem Link This was an interesting problem. ...

Simplify Path

[Problem Link] Tokenize the string with ‘/’ as a delimiter. Create a graph where nodes have pointers to parent nodes. Keep moving up(& down) the graph depending on the directory. If you see a directory, ...