Provide Best Programming Tutorials

## 226. Invert Binary Tree

Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \ 1 3 6 9 Output: 4 / \ 7 2 / \ / \ 9…

## 105. Construct Binary Tree from Preorder and Inorder Traversal

Question Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given preorder = [3,9,20,15,7]…

## 125. Valid Palindrome

Question Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, we define empty string as valid palindrome.…

## Leetcode 234. Palindrome Linked List

Question Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2->2->1 Output: true Follow up: Could you do it…

## Leetcode 21. Merge Two Sorted Lists

Question Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example:…

## Leetcode 104. Maximum Depth of Binary Tree

Question Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…