Mapa mental
Alg Repo Levels Paths
Conteúdo do mapa
Alg Repo Levels Paths
Path
- Path Sum
- Matrix
- Array
- Tree
- root-to-leaf path adding up all, check equals to a sum.
- if(nd == null) return false; tsum += nd.val; if(nd.left == null && nd.right == null){ return tsum == sum ; } return pathSumRecur(nd.left, sum, tsum) || pathSumRecur(nd.right, sum, tsum);
- Given a list of ascending three-digits integers representing a binary tree with the depth smaller than 5, you need to return the sum of all paths from the root towards the leaves.
- If the depth of a tree is smaller than 5, then this tree can be represented by a list of three-digits integers. For each integer in this list: The hundreds digit represents the depth D of this node, 1 <= D <= 4.The tens digit represents the position P of this node in the level it belongs to, 1 <= P <= 8. The position is the same as that in a full binary tree.The units digit represents the value V of this node, 0 <= V <= 9. Given a list of ascending three-digits integers representing a binary tree with the depth smaller than 5, you need to return the sum of all paths from the root towards the leaves.
- Find Max path sum; In BT any sequence of nodes from some starting node to any node
- root-to-leaf path adding up all, check equals to a sum.
- Path Sum
Compression
- String Compression
- compress(“a”) = "a" compress(“aaa”) = "a3" compress(“aaabbb”) = "a3b3" compress(“aaabccc”) = "a3b1c3"
- Array Compression
- String Compression
Word Processor
- One String
- Compare Self
- Palindrome
- Anagram
- Path
- Compare Self
- Two String
- Compare
- S substr of B
- Compare
- String, Dictionary
- One String
Informações
- Descrição
- DS-Alg Mapa Mental sobre Alg Repo Levels Paths, criado por Pradhap Ganesan em 07-11-2019.
- Criado por
- Pradhap Ganesan
- Visualizações
- 0
- Avaliação