Given a non-empty array of integers, every element appears twice except for one. Find that single one. Input_1:Enter the array elements : 1 2 3…

Find the duplicate letters in string. Same to do in dictionary way. Input_1:Enter a String : fcukthecodeOutput:fcuktheod Input_2:Enter a String : programmingOutput:programin Input_3:Enter a String…

Given two strings str1 and str2 and below operations that can performed on str1. Find minimum number of edits (operations) required to convert ‘str1’ into…

Given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit(6…

Given an n x n matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the given 2D…

Given an integer array of size n, find all elements that appear more than [n/3] times. If no such element exists, return -1. Input_1:Array : 20,30,10,10,5,4,20,1,2…

Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the…

Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. For example,Assume that…

Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2,3,5. Input: n= 10 Output: 12Explanation:…