KEMBAR78
Coding Questions | PDF
0% found this document useful (0 votes)
5 views1 page

Coding Questions

The document outlines various coding problems, including finding the third largest element in an array, checking for anagrams, reversing words in a string, and finding the longest substring without repeating characters. It also covers tasks such as identifying pairs that sum to a target, finding repeating numbers, calculating the maximum sum subarray, and transposing a matrix. Additional problems include merging sorted arrays, moving zeros to the end of an array, rearranging distinct elements, and checking for palindrome strings.

Uploaded by

bhimprajapati85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Coding Questions

The document outlines various coding problems, including finding the third largest element in an array, checking for anagrams, reversing words in a string, and finding the longest substring without repeating characters. It also covers tasks such as identifying pairs that sum to a target, finding repeating numbers, calculating the maximum sum subarray, and transposing a matrix. Additional problems include merging sorted arrays, moving zeros to the end of an array, rearranging distinct elements, and checking for palindrome strings.

Uploaded by

bhimprajapati85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like