Coding Questions
To find the third largest element in an array of distinct integers
Given two strings s1 and s2 consisting of lowercase characters, the task is to check whether the
two given strings are anagrams of each other or not. An anagram of a string is another string that
contains the same characters, only the order of characters can be different.
Given a string str, the task is to reverse the order of the words in the given string.
Note that str may contain leading or trailing dots(.) or multiple trailing dots(.) between two
words. The returned string should only have a single dot(.) separating the words.
Given a string s having lowercase characters, find the length of the longest substring without
repeating characters.
Given an array arr[] of n integers and a target value, the task is to find whether there is a pair of
elements in the array whose sum is equal to target. This problem is a variation of 2Sum problem.
Given an array arr[] of n elements that contains elements from 0 to n-1, with any of these
numbers appearing any number of times. The task is to find the repeating numbers.
Given an array arr[], the task is to find the subarray that has the maximum sum and return its
sum.
Given a sorted array of distinct elements arr[] of size n that is rotated at some unknown point, the
task is to find the minimum element in it.
Given a matrix of size n X m, find the transpose of the matrix. Transpose of a matrix is obtained
by changing rows to columns and columns to rows. In other words, transpose of mat[n][m] is
obtained by changing mat[i][j] to mat[j][i].
Given a string, the task is to find the maximum consecutive repeating character in a string.
Given two sorted arrays a[] and b[] of size n and m respectively, the task is to merge them in
sorted order without using any extra space. Modify a[] so that it contains the first n elements and
modify b[] so that it contains the last m elements.
Given an array of integers arr[], the task is to move all the zeros to the end of the array while
maintaining the relative order of all non-zero elements.
Given a sorted array arr[] of size n, the goal is to rearrange the array so that all distinct elements
appear at the beginning in sorted order. Additionally, return the length of this distinct sorted
subarray.
Program to Check for Palindrome String