Add office photos
Premium Employer

Yubi

3.5
based on 201 Reviews
Filter interviews by

Interview Questions and Answers

Updated 5 Feb 2024

Q1. Minimum energy required to cross all the hurdles without loosing life. If any point energy becomes 0 game over. Input: [-2,-3,3,1,5]

Ans.

Find minimum energy required to cross all hurdles without losing life.

  • Calculate cumulative sum of energy required to cross each hurdle.

  • Find the minimum cumulative sum and add 1 to it.

  • If the minimum cumulative sum is negative, return its absolute value + 1.

  • This is the minimum energy required to cross all hurdles without losing life.

Add your answer

Q2. Find edge score of the nodes in a directed graph

Ans.

Edge score of nodes in a directed graph

  • Edge score is a measure of the importance of a node in a graph

  • It is calculated by counting the number of edges that point to or from a node

  • Nodes with higher edge scores are considered more important

  • Edge score can be calculated using algorithms like PageRank or HITS

Add your answer

Q3. Minimum number of platforms required for train station

Ans.

Minimum of two platforms are required for a train station.

  • At least two platforms are needed for trains to arrive and depart simultaneously.

  • Additional platforms may be required depending on the frequency of trains and passenger traffic.

  • Platforms should be long enough to accommodate the longest trains that will use the station.

Add your answer

Q4. Rotten oranges after every second in 2D matrix

Ans.

Simulate rotting of oranges in a 2D matrix every second.

  • Create a queue to store the coordinates of fresh oranges

  • Iterate through the matrix and add the coordinates of fresh oranges to the queue

  • Simulate the rotting process by iterating through the queue and rotting adjacent fresh oranges

  • Keep track of the time taken for all oranges to rot

  • Return -1 if there are any fresh oranges left after the simulation

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

Q5. DB design for air ticket booking system

Ans.

DB design for air ticket booking system

  • Create tables for flights, passengers, bookings, and payments

  • Use foreign keys to establish relationships between tables

  • Include fields for flight details, passenger information, and payment details

  • Consider implementing a caching mechanism for frequently accessed data

Add your answer

Q6. sort the elements of an unsorted array

Ans.

Use any sorting algorithm to sort the elements of an unsorted array.

  • Choose an appropriate sorting algorithm based on the size of the array and the type of elements.

  • Common sorting algorithms include bubble sort, insertion sort, selection sort, merge sort, quick sort, and heap sort.

  • Implement the chosen algorithm in the programming language of your choice.

  • Test the sorting function with various input arrays to ensure correctness.

Add your answer

Q7. Longest Palindromic substring

Ans.

The problem is to find the longest substring that is a palindrome in a given string.

  • A palindrome is a string that reads the same backward as forward.

  • We can use dynamic programming to solve this problem.

  • We can start by considering each character as the center of a palindrome and expand outwards to find the longest palindrome.

  • We can also optimize the solution by using Manacher's algorithm which reduces the time complexity to O(n).

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 Senior Software Engineer Interview Questions from Similar Companies

3.7
 • 53 Interview Questions
3.8
 • 20 Interview Questions
3.6
 • 17 Interview Questions
3.9
 • 15 Interview Questions
3.7
 • 12 Interview Questions
3.2
 • 10 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