Category: math
Write a function to check whether a given 32-bit signed integer is a power of 4. Example: If num = 64, return true. and if num = 9, return …
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most …
Convert a Roman numeral value (ranged from 1 to 3999) to Arabic integer. Letter by Letter Conversion from Roman to Arabic The first few Roman numbers are: I, II, …
Write a function that takes an unsigned integer and returns the number of ’1′ bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11′ …
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You …