Tag: C++ coding exercise
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 …
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 …
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example: Input: S = “loveleetcode”, …