Category: algorithms
For example, Given nums = return 2. Note: Your algorithm should run in linear runtime complexity. Could you implement it using only constant extra space complexity? How many solutions …
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011110000010100101000000). Follow up: If …
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it …
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Merging …
Given an array of n integers where n > 1, nums, return an array output such that output is equal to the product of all the elements of nums …