Skip to content

Therap Software Engineer ​

Interview Stages ​

The selection process has 3 stages,

  1. Initial screening: This round is taken in written format
  2. 1st technical round The first round is taken by the BD team
  3. HR Round: This is the final stage before onboarding and typically deals with salary negotiation.

Software Engineering Questions ​

Given an array of numbers indicating stock price of n consecutive days. If you buy stock at one day and sell at any later day what is the maximum profit that you can get?

πŸ’» Submit Code

Given an array of n integers. You need to take all zeroes in array to the end without changing the relative order of remaining element. eg: [2,0,0,3,1,0,5] => [2,3,1,5,0,0,0]

πŸ’» Submit Code

Given an array of n integers. Reorder the elements such that all odd numbers occur after even numbers.

Given an array of strings. Print the sets of strings which are anagram. eg: ["cat","tab","act","bat","taco"] => [{"cat","act"},{"tab","bat"},{"taco"}]

πŸ’» Submit Code

Given an array of n integers. Find the kth largest element in the array.

πŸ’» Submit Code

Given two very large number in string format. Find the sum of the two number

Given two binary tree. Check if they are identical [not isomorphism]

πŸ’» Submit Code

Given two array of integers. Find the common elements between them.

Unique : πŸ’» Submit Code Repeats: πŸ’» Submit Code

Find pairs with given target sum in a doubly linked list.

Input: 
1 <> 2 <> 4 <> 5 <> 6 <> 8 <> 9
target = 7
Output: 
(1,6), (2,5)

πŸ’» Submit Code

Solve the problem using Object Oriented Programming

C++
int main(){
    int square1width = 50;
    int square2width = 80;
    int rectangle1width = 30, rectangle1height = 40;
    int rectangle2width = 20, rectangle2height = 40;

    int square1area = square1width* square1width;
    int square2area = square2width* square2width;
    int rectangle1area = rectangle1height*rectangle1width;
    int rectangle2area = rectangle2width* rectangle2height;
}

Given an array of sides of triangles, return an array of strings. The strings would be either β€œyes” or β€œno”, corresponding to whether the same indexed triangle is a right triangle or not.

Input: [[3,4,5], [5,9,12], [6,8,10]] Output: ["yes","no","yes"]

A dictionary of sorted words was like this: [a, above, bad, broke, cat,..., yes, yolk, zoo]. After a malfunction it became this: [..., yes, yolk, zoo, a, above, bad, broke, cat,....]. Write a program so that given a word, one can find the word in the dictionary, with the same time complexity as when the dictionary was sorted.

πŸ’» Submit Code

Given two strings s1, s2, return whether a substring of s1 is an anagram of s2

Input: s1 = "hello", s2 = "lol" Output: True
Input: s1 = "hello", s2 = "loa" Output: False

Given two large numbers as strings, num1 and num2 with num1 larger than num2, return their difference in string format, using no direct string to int conversion or libraries.

Given an array containing 0,1,2 sort it.

Input: [2,0,1,1,0,2] Output: [0,0,1,1,2,2]

Using no loops, print this pattern for a given number n:

n, n-5, n-10,....0,....,n-10,n-5,n. Example: 7, 2, -3, 2, 7