Category: c / c++
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, …
Write a function to check whether a given 32-bit signed integer is a power of 4. Example: If num = 64, return true. and if num = 9, return …
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most …
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: Almost every tree …
Given a binary tree, return its inorder traversal of its nodes’ values. For example: The binary tree, 1 \ 2 / 3 should return the inorder = . Recursion …