Add office photos
Employer?
Claim Account for FREE

Raja Software Labs

3.5
based on 94 Reviews
Filter interviews by

10+ Lyzr Interview Questions and Answers

Updated 11 Jan 2025
Popular Designations

Q1. sort a binary array using one traversal and no extra space

Ans.

Sort a binary array using one traversal and no extra space.

  • Use two pointers, one starting from the beginning and one from the end of the array.

  • Swap the elements if the left pointer points to 1 and the right pointer points to 0.

  • Continue traversing until the pointers meet in the middle.

View 1 answer

Q2. find minimum angle between hour and minute hand.

Ans.

Find minimum angle between hour and minute hand.

  • Calculate the angle made by hour hand with 12 o'clock position and minute hand with 12 o'clock position.

  • Calculate the difference between the two angles.

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

Add your answer

Q3. We have given a integer array then find the second maximum difference ?

Ans.

Find the second maximum difference in an integer array.

  • Sort the array in descending order

  • Calculate the difference between adjacent elements

  • Return the second maximum difference

Add your answer

Q4. We have given a integer find the sum of all digits.

Ans.

Given an integer, find the sum of all its digits.

  • Convert the integer to a string and iterate over each character to get the sum.

  • Use modulo operator to get the last digit and add it to the sum, then divide by 10 to remove the last digit.

  • Recursively call the function with the integer divided by 10 and add the remainder to the sum.

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

Q5. 0, 1 array sort (keep complexity low)

Ans.

Sort an array of 0s and 1s with low complexity.

  • Use two pointers, one at the beginning and one at the end of the array.

  • Swap 0s from the beginning with 1s from the end until the pointers meet.

  • Time complexity: O(n), space complexity: O(1).

Add your answer

Q6. Parenthesis balancing Reversing the string Finding the angle between hour and minute hand of clock

Ans.

Three technical questions related to string manipulation and clock calculations.

  • For parenthesis balancing, use a stack data structure to keep track of opening and closing brackets.

  • To reverse a string, use two pointers starting from the beginning and end of the string and swap characters until they meet in the middle.

  • To find the angle between hour and minute hand of clock, use the formula (30H - 11/2M) degrees, where H is the hour and M is the minute.

Add your answer
Are these interview questions helpful?

Q7. maximum span of 1 in a 0,1 array

Ans.

Find the maximum span of 1 in a 0,1 array.

  • Iterate through the array and keep track of the first and last occurrence of 1.

  • Calculate the difference between the last and first occurrence of 1.

  • Repeat the process for all 1's in the array and return the maximum difference.

Add your answer

Q8. Find first non repeated character in string?

Ans.

Find the first non-repeated character in a string.

  • Iterate through the string and count the frequency of each character.

  • Return the first character with a count of 1.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. First non repeating Character

Ans.

Find the first non-repeating character in a string.

  • Create a hash table to store the frequency of each character in the string.

  • Iterate through the string and update the frequency in the hash table.

  • Iterate through the string again and return the first character with a frequency of 1.

Add your answer

Q10. Prime no Add all digits in a number

Ans.

The question asks to check if a number is prime and add all its digits.

  • To check if a number is prime, we can use a loop to divide it by all numbers from 2 to its square root.

  • If the number is divisible by any of these numbers, it is not prime.

  • To add all digits in a number, we can use a loop to extract each digit and add it to a running total.

Add your answer

Q11. 2nd smallest number

Ans.

Find the 2nd smallest number in an array of integers.

  • Sort the array in ascending order

  • Return the second element in the sorted array

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

Interview Process at Lyzr

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

Top Software Engineer Interview Questions from Similar Companies

3.5
 • 48 Interview Questions
3.9
 • 26 Interview Questions
3.4
 • 24 Interview Questions
3.5
 • 16 Interview Questions
2.8
 • 12 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