Category: c / c++
Given an array of integers – find out the maximum product of the tree numbers in the array. For example, output: and , output 24. We can easily write …
Given an array of non-negative integers, re-arrange the numbers so that the even numbers come before the odd numbers. You may return any answer that satisfy the condition. If …
Given a integer, convert it to its base 7 representation in string format. For example, 101 = (202)7 and -7 = (-10)7 Recursive Approach to Convert Integer to Base7 …
Given a binary tree, convert it to a string that consist of parenthesis and interests in the pre-order traversal. The empty brackets () for left sub trees can be …
Given an array of sorted integers, let’s arrange it to a highly balanced binary search tree (BST). The left nodes of a binary search tree are smaller than the …