HashedIn by Deloitte
Solifi Interview Questions and Answers
Q1. Optimize the code for job scheduling written in the first round
Optimize job scheduling code
Use priority queue to efficiently schedule jobs
Implement dynamic programming to optimize job sequence
Consider parallel processing to reduce overall time
Use efficient data structures to store job information
Q2. Optimize the code for generating prime numbers
Use Sieve of Eratosthenes algorithm to optimize prime number generation.
Implement Sieve of Eratosthenes algorithm to eliminate non-prime numbers
Use boolean array to mark non-prime numbers
Start with 2 and mark all its multiples as non-prime, then move to next unmarked number
Stop at square root of the upper limit to optimize performance
Q3. Give a solution to store newspapers of a company
Store newspapers of a company
Create a database to store newspaper information
Use a unique identifier for each newspaper
Include fields for date, title, author, and content
Implement a search function for easy retrieval
Consider implementing a backup system for data security
Q4. Implement a min stack using a single stack
Implement a min stack using a single stack
Create a stack to hold the elements and another stack to hold the minimum values
When pushing an element, check if it's smaller than the current minimum and push it to the minimum stack if it is
When popping an element, check if it's the current minimum and pop it from the minimum stack if it is
To get the minimum value, return the top element of the minimum stack
Q5. Difference between a semaphore and mutex
Semaphore is used to control access to a resource with limited capacity while mutex is used to synchronize access to a shared resource.
Semaphore allows multiple threads to access a resource simultaneously up to a certain limit while mutex allows only one thread to access a shared resource at a time.
Semaphore can be used to solve the producer-consumer problem while mutex can be used to solve the critical section problem.
Semaphore can be binary or counting while mutex is always...read more
Q6. Why Hashedin
Hashedin is a leading software development company with a focus on delivering innovative solutions.
Expertise in cutting-edge technologies
Proven track record of successful project delivery
Strong emphasis on client satisfaction
Collaborative and agile approach to development
Dedicated team of experienced professionals
Q7. Explain the deadlock condition
Deadlock is a situation where two or more processes are unable to proceed because they are waiting for each other to release resources.
Occurs in multi-process systems
Processes hold resources and wait for others to release resources
Can lead to system freeze or crash
Prevented by proper resource allocation and scheduling
Example: Two trains on a single track, each waiting for the other to pass first
Top Technical Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month