Interview Questions and Answers - Order By Newest        This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        Mutex vs Semaphore      Asked in 1 Companies   This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1635. Given array of integers, find first two numbers that adds up to 10.  Core Java 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        Code  Coding      Asked in 1 Companies Ans. array is traversed from first element to last element. Here current element is compared with next element. If current element is greater than next element it is swapped.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        sorting  bubble sort      Asked in 1 Companies   Q1637. Write code to check if a Binary tree is symmetrical  Algorithm 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        binary tree      Asked in 1 Companies   Q1638. Write a program to reverse words of a sentence.  Core Java 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        code  Coding      Asked in 1 Companies   Q1639. how to get most significant bit from a byte?  Core Java 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1640. What data structure will you use if we have to search an element in million of elements ?  Data Structure 
  This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        Search      Asked in 1 Companies   Q1641. Write a function that returns the depth of a tree.  Algorithm 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1642. Write code to find the node where two linked lists intersect.  Algorithm 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1643. Check if tic tac toe has a winner  Algorithm 
  This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1644. Write program to balance a binary tree  Algorithm 
  This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve          Q1645. Given a graph, find if it represents a tree  Algorithm 
Ans. We can simply find it by checking the criteria of a tree. A tree will not contain a cycle, so if there is any cycle in the graph, it is not a tree. We can check it using another approach, if the graph is connected and it has V-1 edges, it could be a tree. Here V is the number of vertices in the graph   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1646. Explain different sorting algorithms and Big O of each  Algorithm 
  This question was recently asked at 'Microsoft,ServiceNow'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 2 Companies   Q1647. Write a program to find loop in a linked list  Algorithm 
  This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1648. How to convert a bst to doubly linked list  Algorithm 
  This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1649. What is a package management system ?  Tool 
Ans. A package management system is a collection of software that automates the process of installing, upgrading and configuring an application.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        rpm  Q1650. What is RPM ?  Tool 
Ans. Redhat Packaging system or rpm is a Package Manager or type of Package Management system extensively used for Linux systems.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        rpm  package management  Q1651. What is priority inversion inheritance method?  
Ans. https://en.wikipedia.org/wiki/Priority_inversion    Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies Ans. Priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a lower priority task effectively inverting the relative priorities of the two tasks.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 5 Companies   Q1653. Does Hibernate synchronize entity with the database automatically i.e any change to entity gets updated in DB ?  Hibernate 
Ans. Yes, the feature is there but can be override with changing the Flush Mode.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve          Q1654. How can we make sure that Hibernate doesn't update the entity changes to DB or how to keep the entity detached ?  Hibernate 
Ans. If it's only a read only transaction, we can wrap the get / load call in read only transaction. 
 
If we want it to be application wide, we an set the flush mode accordingly or else we can evict the entity object to remove them from session.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve         Try 2 Question(s) Test  Q1655. What is the difference between session.clear and session.evict ?  Hibernate 
Ans. session.clear clears all the objects from session whereas session.evict is used for evicting a particular entity.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        hibernate session clear  hibernate evict Try 2 Question(s) Test  Q1656. What is the use of Hibernate session.clear() ?  Hibernate 
Ans. It is used to clear the session and is used to dissociate disconnect all the objects from the session.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        hibernate session clear  Q1657. What is the use of Hibernate session.evict()?  Hibernate 
Ans. It is used to dissociate / disconnect a particular object from the session.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        hibernate session evict  hibernate evict  Q1658. What are the benefits of using Prepared statements ?  Database 
Ans. 1. Precompilation , DB-side caching and reuse of same execution plan leads to overall faster execution. 
 
2. Automatic prevention of SQL injection attacks by escaping special characters   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        Prepared statements  benefits of prepared statements      Asked in 1 Companies  Try 1 Question(s) Test  Q1659. If a company comes to you with a problem statement, how would you help provide a solution for it ?  General 
  This question was recently asked at 'UST Global'.This question is still unanswered. Can you please provide an answer.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve              Asked in 1 Companies   Q1660. What are the benefits of using prepared statements ? Does that benefit extend only if similar prepared statements are used within a application or it extends even with multiple applications having similar prepared statement ?  Database 
Ans. Prepared Statements helps in reuse of database execution plan which can be cached at Database level and hence helps achieving faster execution and performance. As cached ps objects are creating at Database level and not application level, the use and benefit extends across multiple applications.   Help us improve. Please let us know the company, where you were asked this question   :       Like            Discuss            Correct / Improve        Prepared statements  benefits of prepared statements      Asked in 1 Companies  Try 1 Question(s) Test