Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the …
Given a binary tree, each node has value 0 or 1. Each root-to-leaf path represents a binary number starting with the most significant bit. For example, if the path …
A valid parentheses string is either empty (“”), “(” + A + “)”, or A + B, where A and B are valid parentheses strings, and + represents string …
A lot of people are unpopular because they are arrogant, unable to work well with others, and have other personality flaws regardless of what they do for a living. …
Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node’s value equals the given …
Given a non-negative integer c, your task is to decide whether there’re two integers a and b such that a^2 + b^2 = c. Example 1: Input: 5 Output: …