Category: learn to code
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 …
Two strings are isomorphic if the characters in one string can be replaced to get another one. No two characters may map to the same character. A character can …
Given a string that contains characters of ASCII no more than 256, sort it in non-ascending order based on the frequency of the characters. For example, Input “tree” the …