Add office photos
Premium Employer

Zomato

3.8
based on 2.1k Reviews
Filter interviews by

TSK Hospitality Interview Questions and Answers

Updated 10 Sep 2024
Popular Designations
Q1. Time to Burn Tree

You have been given a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the...read more

View 2 more answers

Q2. 1. bitwise OR of the sum of all the subsequence of the array [Hard] 2. course schedule II (leetcode question)

Ans.

Two software development questions: bitwise OR of array subsequences and course schedule II.

  • Question 1 requires finding the bitwise OR of the sum of all subsequences of an array.

  • Question 2 is a LeetCode question about scheduling courses with prerequisites.

  • For question 1, we can use dynamic programming to find all subsequences and then calculate the bitwise OR.

  • For question 2, we can use a topological sort to determine the order in which courses should be taken.

Add your answer

Q3. A hash function was written to convert a string into a hash. Write a un-hash function to revert it(from hash to string)?

Ans.

To un-hash a string, use a reverse algorithm to convert the hash back to the original string.

  • Create a reverse algorithm that takes the hash as input and outputs the original string

  • Use the same logic as the hash function but in reverse order

  • If the hash function used a specific algorithm, use the inverse of that algorithm to un-hash the string

Add your answer

Q4. Find angle between hour hand and minute hand in clock if time is given? Write a program or pseudo code?

Ans.

Find angle between hour and minute hand in a clock given the time.

  • Calculate the angle made by the hour hand with respect to 12 o'clock position

  • Calculate the angle made by the minute hand with respect to 12 o'clock position

  • Find the difference between the two angles and take the absolute value

  • If the angle is greater than 180 degrees, subtract it from 360 degrees to get the smaller angle

Add your answer
Discover TSK Hospitality interview dos and don'ts from real experiences

Q5. Puzzle – 25 horses – 5 lanes, find fastest 3 horses?

Ans.

25 horses in 5 lanes, find fastest 3 horses.

  • Divide horses into groups of 5 and race them, record the top 3 from each group.

  • Race the top 3 horses from each group and record the fastest 3.

  • Total of 7 races required to find the fastest 3 horses.

Add your answer

Q6. Print prime numbers in a given range and optimize the solution?

Ans.

Print prime numbers in a given range and optimize the solution.

  • Use Sieve of Eratosthenes algorithm to generate prime numbers efficiently

  • Start with a boolean array of size n+1, mark all as true

  • Loop through the array and mark all multiples of each prime as false

  • Print all the indexes that are still marked as true

Add your answer
Q7. DBMS Question

What is transaction? Why is it required ?

Add your answer

Q8. Write a regex for email validation?

Ans.

Regex for email validation

  • Start with a string of characters followed by @ symbol

  • Followed by a string of characters and a period

  • End with a string of characters with a length of 2-6 characters

  • Allow for optional subdomains separated by periods

  • Disallow special characters except for . and _ in username

Add your answer

Q9. Given an array of n numbers , find the kth largest find the sum from a th largest to bth largest n can be huge

Ans.

Find the sum of kth to bth largest numbers in a huge array efficiently.

  • Sort the array in descending order to easily find the kth and bth largest numbers.

  • Use a priority queue or min heap to efficiently find the kth and bth largest numbers without sorting the entire array.

  • Once you have the kth and bth largest numbers, iterate through the array and sum the numbers between them.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at TSK Hospitality

based on 3 interviews in the last 1 year
Interview experience
3.7
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.8
 • 78 Interview Questions
4.0
 • 71 Interview Questions
3.7
 • 26 Interview Questions
2.0
 • 24 Interview Questions
4.3
 • 15 Interview Questions
4.2
 • 11 Interview Questions
View all
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