Problem: Given an integer ‘n’, find sum of all n digits which come in power of 2 of given number n. Examples: Input: p = 9 Output: 8 Explanation : 2^9 = ...read more
Given an array of unique integers, print the array in such a way that the first element is first maximum and second element is first minimum and so on. We have to ...read more
LRU cache implementation: Here we have two methods get and set which are defined as follows: get(x) : If the key x exists in the cache, returns its value and update reference ...read more