Tag: C/C++ coding exercise
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 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 …
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Allocate a string and assign input string to it. Change uppercase letters to …
Any positive integers will become 1 following the steps: (1) divide by 2 if it is even (2) otherwise increment or decrement by 1. So the question is: could …
This is another classic interview question: You are asked to write a function (in C/C++) that determines the number of bits required to convert one integer to another. The …