Tag: C++ coding exercise
Question: Implement the inspect_bits function to check if any given 32-bit integer contains 2 or more consecutive ones in its binary representation. If it does, the function should return …
Task: Merge two given sorted integer array A and B into a new sorted integer array. Example A=, B=, return This is the final step of the merge sort …
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted …
Given a string which contains only letters. Sort it by lower case first and upper case second. Example: For “abAcD”, a reasonable answer is “acbAD”. Challenge: You should do …
Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: “Gold Medal”, “Silver Medal” and “Bronze …