Add office photos
Employer?
Claim Account for FREE

Tower Research Capital LLC

3.7
based on 14 Reviews
Filter interviews by

40+ Haeal Pharma Interview Questions and Answers

Updated 16 Sep 2024
Popular Designations
Q1. Best Time to Buy and Sell Stock

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task...read more

View 3 more answers
Q2. Print Nodes at Distance K From a Given Node

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return ...read more

View 2 more answers

Q3. A group of n people is such that a symmetric relation of knowing another exists in the group. i.e. the relation is A knows B. and being symmetric if A knows B then B knows A. Prove that there exist atleast 2 pe...

read more
Ans.

In a group of people with a symmetric relation of knowing each other, there will always be at least two people who know the same number of people.

  • Consider the person who knows the maximum number of people in the group.

  • If there is no one who knows the same number of people, then everyone else must know a different number of people.

  • But this would mean that the total number of people known by everyone else is different from the total number of people known by the person who know...read more

Add your answer
Q4. Dance Together

Ninja has recently joined a dance studio as a coach. In the studio, there are N boys and M girls. He can make K potential pairs out of them. He needs to find the maximum number of pairs he can mak...read more

Add your answer
Discover Haeal Pharma interview dos and don'ts from real experiences
Q5. Shortest path in an unweighted graph

The city of Ninjaland is analogous to the unweighted graph. The city has ‘N’ houses numbered from 1 to ‘N’ respectively and are connected by M bidirectional roads. If a road ...read more

View 2 more answers
Q6. Word Ladder

You are given two strings BEGIN and END and an array of strings DICT. Your task is to find the length of the shortest transformation sequence from BEGIN to END such that in every transformation you c...read more

View 4 more answers
Are these interview questions helpful?

Q7. Consider the set S of the first 2n numbers, then show that for any subset of size n+1 of the set S, there exists 2 numbers u and v such that u divides v

Ans.

For any subset of size n+1 of the set S of the first 2n numbers, there exists 2 numbers u and v such that u divides v.

  • Divide the set S into two subsets of n numbers each.

  • By the pigeonhole principle, at least one of the subsets contains two numbers whose ratio is an integer.

  • If the subset contains n+1 numbers, then one of the numbers must be in the subset with the two numbers whose ratio is an integer.

  • Therefore, there exists 2 numbers u and v such that u divides v.

Add your answer
Q8. Minimum Cost of Reducing Array

You are given an array 'ARR' consisting of 'N' positive integers, and you need to reduce the size of the array to 1 by performing an operation several number of times. In a single ...read more

View 2 more answers
Share interview questions and help millions of jobseekers 🌟

Q9. There were 7 guests at a party + a host. 1st guest shook hands with 1 guy, 2nd guest with 2 guys .... kth guest with k guys. How many people did the host shake hands with? k was either 6 or 7, probably 7 – I do...

read more
Ans.

At a party with 7 guests and a host, each guest shakes hands with a certain number of people. How many people did the host shake hands with?

  • The first guest shakes hands with 1 person, the second with 2 people, and so on.

  • The kth guest shakes hands with k people.

  • The host shakes hands with all 7 guests, so the number of people the host shakes hands with is the sum of 1 to 7.

  • The sum of 1 to n is n(n+1)/2, so the host shakes hands with 28 people.

View 2 more answers
Q10. Clearing the Forest

Ninja lives in a beautiful city known as Byteland. A grand festive event is going to be organised in the city. To make place for the event, King has ordered Ninja to clear the nearby forest. ...read more

View 2 more answers

Q11. In a city represented as a 2-D plane there are buildings at different positions. The position of the buildings(x,y co-ordinates) and their heights are given. Write an efficient algorithm to determine the buildi...

read more
Ans.

Algorithm to determine visible buildings in a 2D plane with given positions and heights

  • Sort the buildings by their x-coordinates

  • Traverse the sorted buildings from left to right

  • For each building, check if it is visible by comparing its height with the maximum height of previously visited buildings

  • If visible, add it to the list of visible buildings

  • Return the list of visible buildings

Add your answer
Q12. Find Number Of Islands

You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

A cell is said to be connected to...read more

View 2 more answers
Q13. Check If Two Nodes Are Cousins

You are given an arbitrary binary tree consisting of N nodes, where each node is associated with a certain value, and two node values, a and b, you need to check if these nodes ar...read more

View 3 more answers
Q14. Nodes In Complete Binary Tree

You are given the root of a complete binary tree, you need to calculate the number of nodes in the given complete binary tree.

A complete binary tree is a tree in which all the leve...read more

View 3 more answers
Q15. Palindromic Substrings

You are given a string ‘S’. Your task is to return all distinct palindromic substrings of the given string in alphabetical order.

A string is said to be palindrome if the reverse of the st...read more

View 2 more answers
Q16. Rotting Oranges

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • ...read more
  • View 3 more answers
    Q17. Largest subarray with equal number of 0s and 1s

    You are given an array consisting of 0s and 1s. You need to find the length of the largest subarray with an equal number of 0s and 1s.

    For example:

    If the given ar...read more
    View 3 more answers
    Q18. Rearrange Array Numbers to form Largest Possible Number

    You are given an array(ARR) of length 'N', consisting of non-negative integers. Using only these given numbers, rearrange the numbers in such a way that th...read more

    View 2 more answers

    Q19. Given an undirected graph, if dist(u,v)>n/2. Show that there exists a vertex x such that removing x makes u and v go to different connected components.

    Ans.

    If dist(u,v)>n/2 in an undirected graph, there exists a vertex x such that removing x makes u and v go to different connected components.

    • Find the shortest path between u and v

    • If the path length is greater than n/2, then there must be a vertex x on the path

    • Removing x will separate u and v into different connected components

    Add your answer

    Q20. Given a string, find the largest substring which can be formed from repetition (>=2) of the smaller string

    Ans.

    Find the largest substring formed from repetition of a smaller string.

    • Identify all possible substrings of the given string.

    • Check if each substring can be formed by repeating a smaller string.

    • Return the largest substring that can be formed from repetition of a smaller string.

    Add your answer
    Q21. Find the perimeter

    You are given a map of an island. Your task is to find the perimeter of the island. The map is represented by a binary grid where ‘0’ represents water, and ‘1’ represents the land.

    Note:
    There...read more
    View 2 more answers

    Q22. Show that for a grid of size n*n, if n is odd then there cannot be a Hamiltonian cycle in the graph

    Ans.

    For an odd-sized grid, there cannot be a Hamiltonian cycle in the graph.

    • A Hamiltonian cycle is a path that visits every vertex exactly once and ends at the starting vertex.

    • In an n*n grid, there are n^2 vertices and each vertex has degree 4.

    • For an odd n, the total degree of all vertices is odd, which means there cannot be a Hamiltonian cycle.

    View 1 answer

    Q23. Prove that F_nk is divisible by F_n where F_i is the ith Fibonacci number. with f_0 = 0

    Ans.

    Prove that F_nk is divisible by F_n where F_i is the ith Fibonacci number. with f_0 = 0

    • Use mathematical induction to prove the statement

    • Base case: F_n0 = 0, F_n is also 0, so 0 is divisible by 0

    • Inductive step: Assume F_nk is divisible by F_n, prove F_n(k+1) is divisible by F_n

    • F_n(k+1) = F_nk + F_n(k-1), use the assumption to show that F_nk is divisible by F_n

    • Therefore, F_n(k+1) is also divisible by F_n

    • Hence, the statement is true for all k

    Add your answer

    Q24. In a 2 D plane, every point is assigned a color either blue or red. Prove that there exists a rectangle with all corners of the same color

    Ans.

    Prove that there exists a rectangle with all corners of the same color in a 2D plane with blue and red points.

    • Divide the plane into a grid of squares.

    • By the pigeonhole principle, there must be at least one row or column with four points of the same color.

    • Consider the pairs of points in that row or column and check if any of them form a rectangle.

    Add your answer

    Q25. The Red-Blue Hat Prisoners puzzle: if prisoner guesses colour of his hat he lives else dies. Idea is to save as many prisoners as possible. Actual solution saves n-1 prisoners but I hadn’t heard this puzzle bef...

    read more
    Ans.

    Solution to Red-Blue Hat Prisoners puzzle that saves n - log(n) prisoners.

    • Red-Blue Hat Prisoners puzzle involves prisoners guessing the color of their own hat to save their lives.

    • The actual solution saves n-1 prisoners, but there are alternative solutions that can save more prisoners.

    • One such solution involves using binary encoding to communicate the color of the hats, which can save n - log(n) prisoners.

    • This solution works by having each prisoner encode the color of their ha...read more

    Add your answer

    Q26. Given a unit circle with center at origin, I choose three points on the circle. Find the expected length of the segment containing (1.0). Hint: answer is not 2*pi/3

    Ans.

    Expected length of segment containing (1,0) on a unit circle with three random points.

    • Use law of cosines to find length of each segment.

    • Calculate expected value using probability density function.

    • Answer is (4/pi) + (2/3).

    Add your answer
    Q27. System Design Question

    You have to create a landing page, where you will provide linkages. On click of linkages button, the respective page should open below. Give different approaches.

    So we can do it using fram...read more

    Add your answer
    Q28. Technical Questions

    What is TLB? Why is it used? What are huge pages and their advantages? Which is accessed first TLB or cache? Can we access TLB and cache in parallel?

    How are system calls made at assembly leve...read more

    Add your answer

    Q29. Given k and DFS traversal string for a k-ary tree, construct the tree. The String contains P (if a parent) and L (if a leaf). E.g. - k=3, str="PPLLLLL" 2. All the strings are arranged in the following order: A,...

    read more
    Ans.

    The question asks to construct a k-ary tree using the given k and DFS traversal string.

    • Iterate through the DFS traversal string

    • If the current character is 'P', create a parent node

    • If the current character is 'L', create a leaf node

    • Link the nodes according to the DFS traversal order

    View 1 answer
    Q30. SQL Question

    Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2000 per month who have been employees for less than months. Sor...read more

    Add your answer
    Q31. Technical Questions

    Asked about the system architecture i was working on. And then went deeper to ask other related stuffs. And also there were some situational questions like what would you do if you get into s...read more

    Add your answer
    Q32. System Design Question

    Given that an API service is responding slower than usual, what steps will you take to figure out the problem?

    Add your answer
    Q33. Machine Coding Question

    How to design Splitwise?

    Add your answer

    Q34. "How would you tell whether a graph has a node with n degree?"

    Ans.

    To determine if a graph has a node with n degree, iterate through all nodes and count their edges.

    • Iterate through each node in the graph

    • Count the number of edges connected to each node

    • If any node has n edges, then the graph has a node with n degree

    Add your answer
    Q35. DBMS Question

    Interviewer asked me to explain the ACID properties and explain the rollback mechanism in DBMS.

    Add your answer
    Q36. System Design Question

    Describe classes and functions for the design of Splitwise.

    Add your answer
    Q37. SQL Question

    So there was employee table and department table and you have to output max earning person from each department.

    Add your answer
    Q38. Code correction

    Given a Problem Statement and a Code we need to find the bug in the code and correct the given code.

    Add your answer

    Q39. Would you prefer to develop mathematical models or to develop the trading infrastructure?

    Ans.

    I would prefer to develop mathematical models.

    • I enjoy the process of creating and testing mathematical models.

    • Developing trading infrastructure is important, but not my primary interest.

    • Mathematical models can be applied to various industries, not just trading.

    • Examples of mathematical models I have developed include predictive models for customer behavior and financial forecasting models.

    Add your answer

    Q40. Check if a string containing parenthesis is balanced

    Ans.

    Check if a string containing parenthesis is balanced

    • Use a stack to keep track of opening parenthesis

    • Iterate through the string and push opening parenthesis onto the stack

    • If a closing parenthesis is encountered, check if the stack is empty or if the top of the stack is the corresponding opening parenthesis

    • If the stack is empty or the top of the stack doesn't match, the string is not balanced

    • After iterating through the string, if the stack is empty, the string is balanced

    Add your answer

    Q41. Check if a graph has a unique Topological sort

    Ans.

    A graph has a unique topological sort if and only if it is a directed acyclic graph (DAG).

    • A topological sort is a linear ordering of the vertices of a graph such that for every directed edge (u, v), vertex u comes before vertex v in the ordering.

    • To check if a graph has a unique topological sort, we can use depth-first search (DFS) or breadth-first search (BFS) algorithms.

    • If during the DFS or BFS traversal, we encounter a back edge or a cycle, then the graph does not have a un...read more

    Add your answer
    Q42. OS Question

    Multiprocessing vs multithreading

    Add your answer

    Q43. Explaining incidents faced

    Ans.

    I have faced incidents related to system crashes, network failures, and security breaches.

    • System crash due to hardware failure

    • Network failure due to misconfiguration

    • Security breach due to weak password policy

    • DDoS attack causing website downtime

    Add your answer

    Q44. Design MakeMyTrip kind of application.

    Ans.

    MakeMyTrip is a travel booking application that allows users to book flights, hotels, and holiday packages.

    • Include features like flight/hotel search, booking, payment gateway integration, and user profiles.

    • Implement filters for search results, reviews/ratings for hotels, and notifications for booking updates.

    • Integrate maps for location tracking, weather forecasts, and customer support chatbot.

    • Offer discounts, loyalty programs, and referral bonuses to attract and retain custom...read more

    Add your answer
    Contribute & help others!
    Write a review
    Share interview
    Contribute salary
    Add office photos
    Interview Tips & Stories
    Ace your next interview with expert advice and inspiring stories

    Top Interview Questions from Similar Companies

    4.0
     • 463 Interview Questions
    4.2
     • 220 Interview Questions
    4.2
     • 199 Interview Questions
    4.1
     • 154 Interview Questions
    4.0
     • 133 Interview Questions
    4.3
     • 131 Interview Questions
    View all
    Top Tower Research Capital LLC Interview Questions And Answers
    Share an Interview
    Stay ahead in your career. Get AmbitionBox app
    qr-code
    Helping over 1 Crore job seekers every month in choosing their right fit company
    70 Lakh+

    Reviews

    5 Lakh+

    Interviews

    4 Crore+

    Salaries

    1 Cr+

    Users/Month

    Contribute to help millions
    Get AmbitionBox app

    Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

    Follow us
    • Youtube
    • Instagram
    • LinkedIn
    • Facebook
    • Twitter