PayPal
10+ RedSeer Consulting Interview Questions and Answers
Q1. Sum Queries in a Sorted Array
Given two arrays arr
and queries
, your task is to determine the sum of all elements in arr
that are less than or equal to each element in queries
. The array arr
is provided in sort...read more
Q2. Minimum Character Deletion Problem Statement
You have been provided a string STR
. Your task is to find and return the minimum number of characters that need to be deleted from STR
so that each character's frequ...read more
Q3. Count Ways To Reach The N-th Stair Problem Statement
You are given a number of stairs, N
. Starting at the 0th stair, you need to reach the Nth stair. Each time you can either climb one step or two steps. You ha...read more
Q4. Find The Sum Of The Left Leaves Problem Statement
Given a binary tree with ‘root’, your task is to find and return the sum of all the left leaf nodes.
Example:
Input:
1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
Outpu...read more
Q5. Median of Two Sorted Arrays
Given two sorted arrays A
and B
of sizes N
and M
, find the median of the merged array formed by combining arrays A
and B
. If the total number of elements, N + M
, is even, the median ...read more
Q6. Problem: Sort an Array of 0s, 1s, and 2s
Given an array/list ARR
consisting of integers where each element is either 0, 1, or 2, your task is to sort this array in increasing order.
Input:
The input starts with...read more
Q7. Find K Closest Elements
Given a sorted array 'A' of length 'N', and two integers 'K' and 'X', your task is to find 'K' integers from the array closest to 'X'. If two integers are at the same distance, prefer th...read more
Q8. Next Greater Element Problem Statement
You are given an array arr
of length N
. For each element in the array, find the next greater element (NGE) that appears to the right. If there is no such greater element, ...read more
Q9. Reverse Only Letters Problem Statement
You are given a string S
. The task is to reverse the letters of the string while keeping non-alphabet characters in their original position.
Example:
Input:
S = "a-bcd"
Ou...read more
Q10. Left View of a Binary Tree
Given a binary tree, your task is to print the left view of the tree. The left view of a binary tree contains the nodes visible when the tree is viewed from the left side.
Input:
The ...read more
Q11. Palindrome Checker Problem Statement
Given an alphabetical string S
, determine whether it is a palindrome or not. A palindrome is a string that reads the same backward as forward.
Input:
The first line of the i...read more
Q12. Similar String Groups Problem Statement
Two strings S1
and S2
are considered similar if either S1
equals S2
or we can swap two letters of S1
at different positions so that it equals S2
.
Input:
The first line of...read more
Interview Process at RedSeer Consulting
Top SDE-2 Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month