Far away in Lonely lands of Punjab’s village there lived mathematically advanced guy. Let’s call him the lost guy because he remains lost in his Mathematical courses.One of the games he is Read more →
Hash
13 postsGiven a number N, the task is to print all duplicate digits of that number in sorted order. Examples: Input: 123412989 Output : 3 4 8 Explanation : The unique digits are Read more →
Hashing is the process of taking the input string of any length and turning it into cryptographic fixed output. Hashing is not an “encryption” we can’t retrieve the original data by decrypting 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 →
Given an integer k and array of length N find the min no of move to make all the elements divisible by k. In one move you can go one of the Read more →
Given an array A[ ] of N segments find any point common to maximum number of segments and also find the number of segments which it is common to. The segments are Read more →
Given an array arr[] and the two elements x and y, the task is to find which element(x or y) has highest occurrence in the array. If the occurrences are the same, Read more →
Given an integer array arr[] and an integer K (greater than 0), the task is to count the subarray whose elements sum up to a multiple of K, else print -1. A Read more →
Given two lowercase alphabet strings s and t return whether you can create a 1-to-1 mapping for each letter in s to another letter (could be the same letter) such that s Read more →
You are given a m*n row wise sorted matrix. The task is to find the common element in all rows of given matrix. Examples: Input : mat[3][4]={{1,3,5,6}, {3,4,7,8}, {1,2,3,4}} Output: 3 Input Read more →