Add office photos
Employer?
Claim Account for FREE

Raja Software Labs

3.6
based on 94 Reviews
Filter interviews by

30+ Vaigai Transport Interview Questions and Answers

Updated 11 Jan 2025
Popular Designations

Q1. 1 print string without taking repeating characters eg helper - helpr

Ans.

The task is to print a string without any repeating characters.

  • Iterate through the string and keep track of the characters seen so far.

  • If a character is already seen, skip it.

  • Otherwise, add it to the output string.

  • Return the output string.

View 1 answer

Q2. angle between hour and minute hand of clock at a given time

Ans.

The angle between hour and minute hand of a clock at a given time.

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

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

  • Find the difference between the two angles

  • If the difference is greater than 180 degrees, subtract it from 360 degrees

  • The result is the angle between the hour and minute hand

Add your answer

Q3. 2 given sum and we have to print all the subsequences in array with given sum

Ans.

Printing all the subsequences in an array with a given sum.

  • Use recursion to generate all possible subsequences.

  • Check if the sum of each subsequence is equal to the given sum.

  • Print the subsequences that satisfy the condition.

  • Time complexity: O(2^n).

Add your answer

Q4. 2 sort array of 0s and 1s in only one loop solution was using two pointers

Ans.

Sort an array of 0s and 1s in one loop using two pointers.

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

  • Swap the values at the pointers if the value at the beginning pointer is greater than the value at the end pointer.

  • Continue until the pointers meet in the middle.

  • Time complexity is O(n).

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

Q5. Occurance of characters in string

Ans.

The question is about finding the occurrence of characters in a string.

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

  • Use a hash table to store the count of each character.

  • Consider the case sensitivity of the characters.

  • Handle special characters and spaces as required.

View 1 answer

Q6. Fibonacci Membership Check

Given an integer N, determine if it is a member of the Fibonacci series. Return true if the number is a member of the Fibonacci series, otherwise return false.

Fibonacci Series Defini...read more

Add your answer
Are these interview questions helpful?

Q7. Reverse Words in a String: Problem Statement

You are given a string of length N. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading or trai...read more

Add your answer

Q8. 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
Share interview questions and help millions of jobseekers 🌟

Q9. 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

Q10. Character Counting Challenge

Create a program that counts and prints the total number of specific character types from user input. Specifically, you need to count lowercase English alphabets, numeric digits (0-...read more

Add your answer

Q11. Maximum Difference Problem Statement

Given an array ARR of N elements, your task is to find the maximum difference between any two elements in ARR.

If the maximum difference is even, print EVEN; if it is odd, p...read more

Add your answer

Q12. 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

Q13. Remainder When Divided By 11 Problem Statement

Determine the remainder when a given number, 'N' in the form of a string, is divided by 11.

Input:

The first line contains an integer 'T' denoting the number of te...read more
Add your answer

Q14. Selection Sort Algorithm

Selection sort is a sorting technique that works by repeatedly finding the minimum element (considering ascending order) from the unsorted part and placing it at the beginning of the un...read more

Add your answer

Q15. 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

Q16. String Palindrome Verification

Given a string, your task is to determine if it is a palindrome considering only alphanumeric characters.

Input:

The input is a single string without any leading or trailing space...read more
Add your answer

Q17. Find the minimum number of coins to make a given value. (Coin Change)

Ans.

Find minimum number of coins to make a given value using dynamic programming.

  • Use dynamic programming to find the minimum number of coins needed.

  • Create a dp array to store the minimum number of coins for each value up to the given value.

  • Iterate through each coin denomination and update the dp array accordingly.

  • Return the value at the given value index in the dp array.

Add your answer

Q18. Star Pattern Problem Statement

Display the star pattern for a given positive integer N.

Example:

Input:
N = 4
Output:
 *
***
*****
*******
Explanation:

The dots in the image represent spaces. Align the stars in...read more

Add your answer

Q19. 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

Q20. 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

Q21. 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

Q22. 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

Q23. First non repeating character in a string

Ans.

Find the first non-repeating character in a string.

  • Create a hash table to store character frequency

  • Iterate through the string and update the hash table

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

Add your answer

Q24. Longest substring pallandrome in a string

Ans.

Find the longest substring that is a palindrome in a given string.

  • Use dynamic programming to solve the problem efficiently.

  • Create a 2D boolean array to store the results of subproblems.

  • Check for palindromes of length 1 and 2 separately.

  • For substrings of length greater than 2, check if the first and last characters are the same and the substring between them is also a palindrome.

  • Update the result if a longer palindrome is found.

Add your answer

Q25. 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

Q26. 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

Q27. Second Maximum Number in Array

Ans.

Find the second maximum number in an array of strings.

  • Convert the array of strings to an array of integers.

  • Sort the array in descending order.

  • Return the second element in the sorted array.

Add your answer

Q28. find prime numbers value.

Ans.

A prime number is a number greater than 1 that is divisible only by 1 and itself.

  • Start with a loop to iterate through numbers

  • Check if each number is divisible by any number from 2 to its square root

  • If not divisible, add it to the list of prime numbers

View 1 answer

Q29. nearest Prime number

Ans.

To find the nearest prime number, iterate from the given number in both directions until a prime number is found.

  • Start iterating from the given number in both directions to find the nearest prime number.

  • Check if a number is prime by dividing it by all numbers less than its square root.

  • Keep track of the closest prime number found during the iteration.

Add your answer

Q30. 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

Q31. How to find the reverse of a string of a particular order seperated by dots.

Ans.

To reverse a string of a particular order separated by dots, split the string into an array, reverse the array, and join it back into a string.

  • Split the string using the dot separator

  • Reverse the resulting array

  • Join the array back into a string using the dot separator

Add your answer

Q32. How to find the year is leap or not using single if condition.

Ans.

To find leap year using single if condition

  • Check if year is divisible by 4 and not divisible by 100

  • Or check if year is divisible by 400

  • If either of the above conditions is true, then it's a leap year

Add your answer

Q33. What do you know about medicine and its distribution in worldwide

Ans.

Medicine distribution involves manufacturing, regulation, transportation, and sales of pharmaceutical products globally.

  • Medicine distribution is a complex process involving various stakeholders such as manufacturers, distributors, pharmacies, and healthcare providers.

  • Regulatory bodies like the FDA in the US and the EMA in Europe play a crucial role in ensuring the safety and efficacy of medicines.

  • Global pharmaceutical companies like Pfizer, Novartis, and Roche have a signific...read more

Add your answer

Q34. find if the given year is a leap year or not.

Ans.

Check if a given year is a leap year or not.

  • A leap year is divisible by 4, but not by 100 unless it is also divisible by 400

  • For example, 2000 is a leap year because it is divisible by 400, while 1900 is not because it is divisible by 100 but not by 400

Add your answer
Asked in
SDE Interview

Q35. Sorting algorithms and their implementations

Ans.

Sorting algorithms are used to arrange elements in a specific order.

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

  • Each sorting algorithm has its own time complexity and space complexity.

  • Sorting algorithms can be implemented in various programming languages such as C++, Java, Python, etc.

Add your answer

Q36. Finding spaces in string

Ans.

To find spaces in a string, use the split() method and count the resulting array length minus one.

  • Use the split() method with a space as the delimiter

  • Count the length of the resulting array minus one

  • Example: 'Hello World'.split(' ').length - 1 returns 1

Add your answer

Q37. How it defines

Ans.

The question is unclear. Please provide more context.

  • Can you please clarify the question?

  • What is 'it' referring to?

  • Without more information, I cannot provide a clear answer.

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

Interview Process at Vaigai Transport

based on 27 interviews
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.8
 • 482 Interview Questions
4.1
 • 365 Interview Questions
3.7
 • 340 Interview Questions
3.9
 • 208 Interview Questions
3.7
 • 180 Interview Questions
4.1
 • 162 Interview Questions
View all
Top Raja Software Labs 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

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