Arcesium
10+ Accion Labs Interview Questions and Answers
How to achieve multitasking in Java ?
Multitasking in Java can be achieved using threads.
Create multiple threads to execute tasks concurrently.
Use the Thread class or the Runnable interface to define the tasks.
Use synchronization mechanisms like locks or semaphores to coordinate access to shared resources.
Java provides built-in support for multitasking with the Thread class and the Executor framework.
Example: creating two threads to perform different tasks simultaneously.
What are ACID properties?
ACID properties are a set of properties that guarantee reliability and consistency in database transactions.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that a transaction is treated as a single unit of work, either all of its operations are executed or none.
Consistency ensures that a transaction brings the database from one valid state to another.
Isolation ensures that concurrent transactions do not interfere with each other.
Durability ...read more
What is a transaction?
A transaction is a logical unit of work that consists of multiple database operations that must be executed as a single, indivisible unit.
A transaction ensures data consistency and integrity.
It follows the ACID properties: Atomicity, Consistency, Isolation, and Durability.
Transactions are used to maintain data integrity in databases.
Examples of transactions include transferring funds between bank accounts or updating inventory levels.
Design Schema for restaurant apps like Zomato.
Design a schema for a restaurant app like Zomato.
Create tables for restaurants, users, reviews, and orders
Include columns for restaurant details like name, address, cuisine type
Include columns for user details like name, email, and password
Link reviews to restaurants and users
Link orders to restaurants and users
Consider additional tables for menu items, categories, and ratings
Q5. Find first missing positive integer from an array for non-negative integers.
Find first missing positive integer from an array of non-negative integers.
Create a hash set to store all positive integers in the array
Loop through the array and add all positive integers to the hash set
Loop through positive integers starting from 1 and return the first missing integer not in the hash set
What is a semaphore ?
A semaphore is a synchronization object that controls access to a shared resource through the use of a counter.
Semaphores are used to manage concurrent access to shared resources in multi-threaded or multi-process environments.
They can be used to limit the number of threads or processes that can access a resource simultaneously.
Semaphores can have two types: counting semaphores and binary semaphores.
Counting semaphores allow multiple threads/processes to access a resource at ...read more
Difference between sql and no sql database
SQL databases are relational databases that use structured query language, while NoSQL databases are non-relational databases that use various data models.
SQL databases are based on a fixed schema, while NoSQL databases are schema-less.
SQL databases are better suited for complex queries and structured data, while NoSQL databases are better for unstructured and semi-structured data.
SQL databases ensure ACID (Atomicity, Consistency, Isolation, Durability) properties, while NoSQ...read more
Q8. Given list of strings group them into distinct anagrams.
Group list of strings into distinct anagrams.
Create a hash table with sorted string as key and list of anagrams as value.
Iterate through the list of strings and add each string to its corresponding anagram list in the hash table.
Return the values of the hash table as a list of lists.
Q9. Find least common ancestor of a binary tree.
Find the lowest common ancestor of a binary tree.
Traverse the tree recursively from the root node.
If the current node is null or matches either of the given nodes, return the current node.
Recursively search for the nodes in the left and right subtrees.
If both nodes are found in different subtrees, return the current node.
If both nodes are found in the same subtree, continue the search in that subtree.
Q10. Minimum weight to reach bottom right corner in matrix starting from top left. you can move only down and right
The minimum weight to reach the bottom right corner in a matrix starting from the top left by moving only down and right.
Use dynamic programming to calculate the minimum weight at each cell by considering the weights of the cells above and to the left.
At each cell, the minimum weight to reach that cell is the minimum of the weight of the cell itself plus the minimum weight of the cells above and to the left.
Example: For a matrix [[1, 3, 1], [1, 5, 1], [4, 2, 1]], the minimum ...read more
Q11. How to achieve multitasking in java
Multitasking in Java can be achieved through multithreading.
Create a new thread using the Thread class or Runnable interface
Use the start() method to start the thread
Synchronize shared resources to avoid race conditions
Use wait() and notify() methods for inter-thread communication
Example: creating a thread to perform a long-running task while the main thread continues executing other tasks
Q12. 1.Desgin Schema for restaurant apps like zomato.
Design a schema for a restaurant app like Zomato.
Create tables for restaurants, menus, reviews, and users.
Include columns for restaurant name, location, cuisine, and ratings.
Add columns for menu items, prices, and descriptions.
Include user information such as name, email, and password.
Create relationships between tables using foreign keys.
Implement search and filter functionality for restaurants and menus.
Allow users to leave reviews and ratings for restaurants.
Include featur...read more
Q13. difference between sql and nosql dbs
SQL is a relational database while NoSQL is a non-relational database.
SQL databases use structured query language while NoSQL databases use unstructured query language.
SQL databases are vertically scalable while NoSQL databases are horizontally scalable.
SQL databases are good for complex queries while NoSQL databases are good for large amounts of unstructured data.
Examples of SQL databases include MySQL, Oracle, and PostgreSQL while examples of NoSQL databases include MongoDB...read more
Q14. Design a parking lot
Design a parking lot
Consider the size and capacity of the parking lot
Decide on the layout and organization of parking spaces
Implement a system to manage parking availability and reservations
Include features like ticketing, payment, and security
Consider scalability and future expansion
Q15. what is semaphores?
Semaphores are a synchronization tool used to control access to a shared resource.
Semaphores can be used to prevent race conditions in multi-threaded programs.
They can be used to limit the number of concurrent accesses to a resource.
Semaphores can be binary (0 or 1) or counting (0 to n).
Examples of semaphore functions include wait(), signal(), and init().
Q16. what is transaction?
A transaction is a unit of work that is performed on a database.
A transaction is a sequence of database operations that are treated as a single unit of work.
It ensures that all the operations are completed successfully or none of them are performed.
Transactions are used to maintain data consistency and integrity in a database.
Examples of transactions include transferring money between bank accounts or updating inventory levels in a retail system.
Q17. Hashing and collision in hashing
Hashing is a process of converting data into a fixed-size output. Collision occurs when two different inputs produce the same output.
Hashing is used for indexing and retrieving data quickly
Hash functions should be deterministic and produce the same output for the same input
Collisions can be resolved using techniques like chaining or open addressing
Examples of hashing algorithms include MD5, SHA-1, and SHA-256
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month