Given a singly linked list, determine if it is a palindrome. A palindrome is a string/number that mirrors itself, for example, 21312 reverse is also 21312. We are given …
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array is rotated to . Pop …
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, …
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, …
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 …