TechSophy
Hays Business Solutions Interview Questions and Answers
Q1. Least number of iterations in which to find one defective weight among equal weights
The minimum number of iterations required to find one defective weight among equal weights.
Use binary search to divide the weights into two groups.
Compare the sum of weights in each group to identify the defective group.
Repeat the process with the defective group until the defective weight is found.
Q2. Least number of steps to reach end of array
Minimum steps to reach end of array
Use dynamic programming approach
Start from the end and work backwards
Keep track of minimum steps at each index
Q3. String Reversal using recursion
String reversal using recursion
Define a function that takes a string as input
Base case: if the length of the string is 0 or 1, return the string
Recursive case: return the last character of the string concatenated with the result of calling the function with the string minus the last character
Q4. Basic Indroduction Life values
Life values are the principles and beliefs that guide an individual's decisions and actions.
Life values are shaped by personal experiences, culture, and upbringing.
They can include honesty, integrity, compassion, and respect for others.
Life values can also influence career choices and relationships.
Examples of life values include family, education, health, and spirituality.
Q5. Reverse string program
Reverse a string program using array of strings
Create a character array to store the reversed string
Iterate through the original string and copy characters in reverse order to the new array
Join the characters in the new array to form the reversed string
Q6. Secure way of storing tokens
Secure way of storing tokens
Use a secure token storage mechanism like Keychain on iOS or SharedPreferences on Android
Encrypt the tokens before storing them
Implement proper access controls and permissions to restrict access to the tokens
Regularly rotate and invalidate tokens to minimize the risk of unauthorized access
Q7. Sorting algorithm in C
Sorting algorithm in C
Popular sorting algorithms in C include Bubble Sort, Insertion Sort, Selection Sort, Merge Sort, Quick Sort, and Heap Sort
Bubble Sort is simple but inefficient, while Merge Sort and Quick Sort are more efficient but more complex
The choice of sorting algorithm depends on the size of the data set and the desired time complexity
Q8. Prime number program
A prime number program checks if a given number is only divisible by 1 and itself.
Check if the number is greater than 1
Iterate from 2 to the square root of the number and check for divisibility
If no divisors found, the number is prime
More about working at TechSophy
Interview Process at Hays Business Solutions
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month