FarEye
10+ Acufore India Interview Questions and Answers
Q1. How to find second highest salaried person details from a table
To find the second highest salaried person details from a table
Sort the table in descending order based on salary
Select the second row from the sorted table
Retrieve the details of the person from the selected row
Q2. What is LRU caching and how it can be implemented?
LRU caching is a technique to store frequently used data in cache memory to improve performance.
LRU stands for Least Recently Used.
It removes the least recently used item from the cache when the cache is full.
It uses a doubly linked list and a hash map to implement the cache.
When an item is accessed, it is moved to the front of the list.
When the cache is full, the item at the end of the list is removed.
Example: Java LinkedHashMap and Python OrderedDict use LRU caching.
Q3. Print the all anagrams of same type in same line from array of Strings
Print all anagrams of same type in same line from array of Strings
Create a HashMap with sorted string as key and list of anagrams as value
Iterate through array and add each string to corresponding list in HashMap
Print all values in HashMap
Q4. Explain producer-consumer problem and write code using thread.
Producer-consumer problem involves synchronization between threads to avoid race conditions.
Producer produces data and adds it to a shared buffer
Consumer consumes data from the shared buffer
Synchronization is required to avoid race conditions
Code example: https://www.geeksforgeeks.org/producer-consumer-solution-using-threads-in-java/
Q5. what is umass and u mass value for root user
UMASK is a value that sets default permissions for newly created files and directories for a user. UMASK value for root user is typically 022.
UMASK is a four-digit octal number that represents the permissions for newly created files and directories.
The UMASK value for the root user is typically 022, which means that the default permissions for new files are 644 and for new directories are 755.
Q6. Programming questions- 1) wap to print 1,5,10,....,100. 2)wap to print Fibonacci series. 3)given an array to strings. Print last 3words of every string in that array.
Programming questions on printing numbers and manipulating strings.
For printing 1,5,10,...,100, use a loop and increment the number by 4 in each iteration.
For printing Fibonacci series, use a loop and add the previous two numbers to get the next number.
For printing last 3 words of every string in an array, split each string into words and print the last three words.
Q7. PODs and manifiest file in Kubernetes
PODs are the smallest deployable units in Kubernetes, while manifest files define the desired state of resources.
PODs are groups of containers that share the same network and storage resources
Manifest files are YAML or JSON files that describe the desired state of Kubernetes resources
Manifest files include information such as the type of resource, its name, labels, and specifications
Manifest files can be used to create, update, or delete resources in Kubernetes
Q8. Check a tree is BST or not.
To check if a tree is a BST or not.
Traverse the tree in-order and check if the values are in ascending order.
For each node, check if its value is greater than the maximum value of its left subtree and less than the minimum value of its right subtree.
Recursively check if the left and right subtrees are also BSTs.
Q9. Reverse a single linked list.
Reverse a single linked list.
Iterate through the list and change the direction of the pointers
Keep track of the previous, current and next nodes
Set the head of the list to the last node after reversing
Q10. Features added in Java 8
Java 8 introduced lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow functional programming in Java.
Functional interfaces are interfaces with a single abstract method.
Streams provide a way to process collections of data in a functional way.
Default methods allow interfaces to have implementation.
Date and Time API improvements.
Nashorn JavaScript engine added.
Q11. Given a sorted and rotated array arr[] of size N and a key, the task is to find the key in the array. Input : arr[] = {5, 6, 7, 8, 9, 10, 1, 2, 3}, key = 3 Solution log(n)
Use binary search to find the key in a sorted and rotated array.
Apply binary search to efficiently find the key in the array.
Check if the key is in the left or right half of the array based on the mid element.
Adjust the search space accordingly based on the comparison of key with elements at start, mid, and end of the array.
Q12. too find all numbers whose consecutive digits differ by 1
Find all numbers whose consecutive digits differ by 1
Iterate through all numbers and check if consecutive digits differ by 1
Start with 12 and increment by 1 until 98
Add the number to the result array if it satisfies the condition
Q13. Sort Array having only 0 and 1 in O(n)
Sort an array of 0s and 1s in O(n) time 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.
Alternatively, count the number of 0s and 1s and overwrite the array with the correct number of each.
Q14. What is smoke testing
Smoke testing is a preliminary testing to check if the basic functionalities of a software application are working fine.
Smoke testing is a quick and shallow testing of the critical functionalities of an application.
It is usually performed before more in-depth testing to ensure that the application is stable enough for further testing.
The main purpose of smoke testing is to verify that the application is ready for more rigorous testing.
Smoke testing is not exhaustive and does ...read more
Q15. What is regression testing
Regression testing is the process of retesting a software application to ensure that new code changes have not adversely affected existing functionality.
Regression testing is performed after code changes to verify that the existing functionality still works correctly.
It helps in identifying any defects introduced by new code changes.
Automated testing tools are often used for regression testing to save time and effort.
Regression testing can be done manually or automatically.
Ex...read more
Q16. write a code and explain it
Code to sort an array of strings in alphabetical order
Use the sort() method to sort the array of strings
Pass a compare function to sort alphabetically
Q17. Left View of a tree
The left view of a tree shows the nodes that are visible when looking at the tree from the left side.
Traverse the tree in a level order manner
Keep track of the first node encountered at each level
Add the first node at each level to the result array
Interview Process at Acufore India
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month