Given an integer num, you need to return the sum all its digits in the number. ASWE 2025
Therap Software Engineer β
Interview Stages β
The selection process has 3 stages,
- Initial screening: This round is taken in written format
- 1st technical round The first round is taken by the BD team
- HR Round: This is the final stage before onboarding and typically deals with salary negotiation.
Initial Screening Questions β
Given an integer n, for every number i in the range 1 <= i <= n, print one of the following:
"FizzBuzz"if i is divisible by 3 and 5."Fizz"if i is divisible by 3."Buzz"if i is divisible by 5.iif none of the above conditions are true. ASWE 2025
Given an integer array nums. All the integers of nums are sorted in ascending order except for one element. Find the index of the element. ASWE 2025
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?
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]
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"}]
Given an array of n integers. Find the kth largest element in the array.
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]
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)Solve the problem using Object Oriented Programming
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.
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
Design this legacy table for using in a relational database.
| ID | Name | Subject | Courses | |
|---|---|---|---|---|
| 1 | Rahim | rahim@gmail.com | CSE | CSE101, CSE102, EEE101, CIVIL104 |
| 2 | karim | karim@gmail.com | EEE | EEE101, EEE102, CSE102, CIVIL104 |
| 3 | Josim | josim@gmail.com | BME | EEE101, CSE101, BME101 |
| 4 | Belal | belal@gmail.com | CIVIL | CIVIL101, CIVIL102, MECHA101, EEE101 |
| 5 | Rakib | rakib@gmail.com | MECHA | CSE101, BME101, MECHA101, MECHA101 |
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: 7Given 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"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"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: 3You 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 > hGiven a database table, normalize it. Show the primary key, foreign key, and the relationships among the tables.
| code | bus_name | type | from | to | departure | arrival | days |
|---|---|---|---|---|---|---|---|
| 101 | Khanika | express | dhaka | rajshahi | 9 am | 9 pm | sat, mon, thu |
| 102 | Taranga | local | dhaka | khulna | 10 pm | 11 am | everyday |
| 103 | Ulka | express | dhaka | chittagong | 10 pm | 11 am | sat, 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]]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"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.
Auguest 2026 β
You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list.
Input: list1 = 1 > 2 > 4, list2 = 1 > 3 > 4
Output: 1 > 1 > 2 > 3 > 4 > 4Given a string s which represents an expression, evaluate this expression and return its value. The integer division should truncate toward zero. You may assume that the given expression is always valid and all intermediate results will be in the range of [-2^31, 2^31 - 1]. You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval().
Input: s = "3+2*2"
Output: 7Given the head of a linked list, remove the nth node from the end of the list and return its head.
Input: head = 1 > 2 > 3 > 4 > 5, n = 2
Output: 1 > 2 > 3 > 5Have you worked on any group projects where you incorporated AI into the development process? If so, what challenges did you encounter while working on the project?
Design a prompt that accepts unstructured user input and transforms it into structured JSON. The prompt should extract the relevant task information, assign an appropriate status such as pending, processing, or completed, and determine the task's urgency using a numerical scale.
Given the following database table, normalize the relation into 1NF, 2NF, and 3NF. Identify the primary key and foreign keys, and define the relationships among the resulting tables.
| Teacher Name | Teacher Email | Subject | Class | Class Timing | Day |
|---|---|---|---|---|---|
| Alis | alis@email.com | Mathematics | 10-A | 9:00 AM | Sunday, Tuesday |
| Zara | zara@email.com | Physics | 10-B | 10:00 AM | Monday, Wednesday |
| Alis | alis@email.com | English | 10-A | 11:00 AM | Thursday, Friday |
| Zara | zara@email.com | Mathematics | 10-B | 12:00 PM | Sunday, Wednesday |
| Alis | alis@email.com | Physics | 10-A | 2:00 PM | Monday, Friday |
Design an object-oriented programming solution for a Vending Machine system. The system should model classes such as VendingMachine, Product, Payment, and other necessary components.