Newgen Software Technologies
Justransform Interview Questions and Answers
Q1. Dofferemt ways to prevent rerendering of a child component in react?
Prevent rerendering of a child component in React
Use shouldComponentUpdate() lifecycle method
Use React.memo() to memoize functional components
Use PureComponent instead of Component
Pass props as a callback function to avoid unnecessary re-renders
Use React.PureComponent for class components
Use React.memo() for functional components
Q2. -React lifecycle?-Fragment vs React. Fragment? -React pure component?
React lifecycle, Fragment vs React.Fragment, React.PureComponent
React lifecycle consists of mounting, updating, and unmounting phases
Fragment is a shorthand for React.Fragment, used to group multiple elements
React.PureComponent is a class component that implements shouldComponentUpdate method for performance optimization
Q3. JavaScript hoisting?- Let, var and cont difference?
JavaScript hoisting and differences between let, var and const.
Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope.
Var declarations are hoisted to the top of their scope, while let and const declarations are not.
Var can be redeclared and reassigned, let can be reassigned but not redeclared, and const cannot be reassigned or redeclared.
Using const is recommended for variables that should not be reassigned, while let ...read more
Q4. Stream api find the second largest salary
Use Stream API to find the second largest salary in an array of salaries.
Use Stream.sorted() to sort the salaries in descending order
Use Stream.skip(1).findFirst() to get the second highest salary
Q5. Insert middle in the linked list
Insert a node in the middle of a linked list
Find the middle node using slow and fast pointers
Insert the new node after the middle node
Update the pointers to maintain the linked list structure
Q6. reverse the linked list
Reverse a linked list
Iterate through the linked list and change the direction of pointers
Use three pointers to keep track of current, previous, and next nodes
Update the head of the linked list to point to the last node
Interview Process at Justransform
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month