Tip 1: Strengthen your basics.
Tip 2: Stay calm and don’t panic during interviews.
Tip 3: Go beyond classroom studies.
Tip 1: Keep it simple.
Tip 2: Don’t include anything you’re not familiar with.
It was in the morning. The online assessment included aptitude questions.
If A can do a job in 10 days and B can do the same job in 15 days, how long will it take them to complete the job working together?
A group of 20 workers can complete a job in 30 days. If the number of workers is increased by 50%, how long will it take to complete the same job?
Pointing to a photograph of a boy, Suresh said, "He is the son of the only son of my mother." How is Suresh related to that boy?



A majority element is an element that occurs more than floor('N' / 2) times in the array.
The idea is to sort the array so that similar elements are next to each other. Once sorted, go through the array and keep track of how many times each element appears. When you encounter a new element, check if the count of the previous element was more than half the total number of elements in the array. If it was, that element is the majority and should be returned. If no element meets this criterion, then no majority element exists.



Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]
Output: 3.5
Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Let us consider the case of a total odd number of elements. Also, consider that i elements from the first array and j elements from the second array are on the left half of the median (including the median itself). Then, the maximum of a[i] and b[j] is the median. The important task is to efficiently find such i and j.



Input: 'X' = 2
Output: 1
As only one digit is ‘2’ present in ‘X’ so answer is ‘1’.
The idea is to remove digits from the right by calling a recursive function for each digit. The base condition of this recursive approach is when we divide the number by 10 and the number gets reduced to 0, so return 1 for this operation. Otherwise, keep dividing the number by 10; this reduces the input number size by 1 and keeps track of the number of sizes reduced.
The round was held after successfully completing and passing the technical round.
This round included an interview with the HR.
The HR tried to make me take it casually, but I ignored that and acted as if I was listening carefully so that he could see how dedicated I am to the role and the interview.
Tip 1: Be calm.
Tip 2: Take time to think before you answer riddles or any other questions.
Tip 3: Be honest; don’t fake it.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?