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

April 2026 ​

You are given a list of orders, where each order takes a certain amount of time to process (e.g., brewing a coffee). There are k identical machines available to process these orders. Orders are processed on a first-come, first-served basis, and each order must be assigned to exactly one machine. Orders will be placed sequentially. Find the total time required to complete all orders.

Input: k = 2, orders = [3,2,5,4]
Output: 7

Given an encoded string, return its decoded string.

The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a positive integer. There can be nested encoding. You may assume that the input string is always valid; digits are only used as repeat numbers.

Input: s = "3[a2[bc]]"
Output: "abcbcabcbcabcbc"

πŸ’» Submit Code

Given two strings s and t, return the shortest substring of s such that every character in t, including duplicates, is present in the substring. If such a substring does not exist, return an empty string "".

Input: s = "OUZODYXAZV", t = "XYZ"
Output: "YXAZ"

πŸ’» Submit Code

Given an integer array nums, return the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle.

Input: nums = [2,2,3,4]
Output: 3

πŸ’» Submit Code

You are given a singly linked list. Traverse the list and reverse every block of 3 consecutive nodes. If the number of nodes is not a multiple of 3, the remaining nodes at the end should be left as is.

Input:  a > b > c > d > e > f > g > h
Output: c > b > a > f > e > d > g > h

πŸ’» Submit Code

Given a database table, normalize it. Show the primary key, foreign key, and the relationships among the tables.

codebus_nametypefromtodeparturearrivaldays
101Khanikaexpressdhakarajshahi9 am9 pmsat, mon, thu
102Tarangalocaldhakakhulna10 pm11 ameveryday
103Ulkaexpressdhakachittagong10 pm11 amsat, sun

Given an integer n, find the first n rows of Pascal's triangle.

Input: n = 4
Output: [[1], [1,1], [1,2,1], [1,3,3,1]]

πŸ’» Submit Code

An alien's warship has a large amount of fuel and needs to distribute it across multiple vessels. As the amount is very large, the fuel amount is given in string format and a divisor is given. Output the quotient.

Input:  total amount = "44444444444666666667777777777", divisor = 2
Output: quotient = "22222222222333333333888888888"

πŸ’» Submit Code

Given a list of software versions in chronological order and a current version, output the following.

Input:
versions = ["1.0", "1.5", "2.0"]
current_version = "1.0"

Output:
{
  "isLatest": false,
  "latestVersion": "2.0",
  "versionBehind": 2
}

Design an object-oriented programming solution for a parking management system. The system should model ParkingLot, ParkingSpace, and Ticket, and support different types of vehicles using a Vehicle superclass with subclasses such as Car and Motorbike.

Write about a project you have implemented. Discuss the use of AI, the challenges faced, and how you overcame those challenges.