Author: ACMer
Given a binary tree root, return the sum of each of the diagonals in the tree starting from the top to bottom right. For example, given 1 / \ …
Given a binary search tree root, and k return the kth (0-indexed) smallest value in root. It is guaranteed that the tree has at least k + 1 nodes. …
Trie is a useful data structure allow us to search a given word or check if any words start with prefix in O(N) efficient time. The following is the …
You are given a singly linked list node containing positive integers. Return the same linked list where every node’s next points to the node val nodes ahead. If there’s …
Given a singly linked list node, and an integer target, return the same linked list with all nodes whose value is target removed. Example 1 Input node = 0 …