Lowe's
10+ A P Hosiery Industries Interview Questions and Answers
Q1. What is the difference between virtual and real DOM?
Virtual DOM is a lightweight copy of the real DOM, used for efficient updates.
Real DOM updates are slow and expensive, while virtual DOM updates are fast and efficient.
Virtual DOM is used in React to update the UI without reloading the entire page.
Real DOM is the actual HTML document, while virtual DOM is a JavaScript object.
Virtual DOM compares the previous and current states of the UI to determine the minimum number of changes needed.
Real DOM updates require direct manipula...read more
Q2. Create some dynamic buttons with a json data and whenever you click on that you need to maintain active and inactive states and also you need to show the content of the button based on the json data whenever yo...
read moreCreate dynamic buttons with JSON data, maintain active/inactive states, and show content on click
Create buttons dynamically using JSON data
Toggle between active and inactive states on click
Display button content based on JSON data on click
Q3. What is the difference between var, let and const?
var is function scoped, let and const are block scoped. var can be redeclared and reassigned, let can be reassigned but not redeclared, const cannot be reassigned or redeclared.
var is hoisted to the top of the function, let and const are not
var can be redeclared within the same scope, let and const cannot
let and const have a temporal dead zone where they cannot be accessed before they are declared
const cannot be reassigned, but the properties of a const object can be modified...read more
Q4. Agile methodology and your previous projects
I have experience working with Agile methodology in my previous projects.
I have worked in Scrum and Kanban frameworks.
I have experience in conducting daily stand-up meetings, sprint planning, and retrospectives.
I have worked in cross-functional teams and have experience in collaborating with product owners and stakeholders.
I have used tools like Jira and Trello to manage tasks and track progress.
In one of my previous projects, we used Agile methodology to develop a mobile app...read more
Q5. SQL queries to get 2nd highest salary
SQL query to get 2nd highest salary
Use ORDER BY and LIMIT to get the highest salary
Use subquery to exclude the highest salary and get the 2nd highest
Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 1,1
Q6. Optimization techniques in React.
Optimization techniques in React include code splitting, lazy loading, and memoization.
Code splitting: breaking down the code into smaller chunks to reduce load time.
Lazy loading: loading components only when they are needed, reducing initial load time.
Memoization: caching the results of expensive function calls to improve performance.
Using shouldComponentUpdate to prevent unnecessary re-renders.
Using React.PureComponent or implementing shouldComponentUpdate for functional co...read more
Q7. Immutable Class, Remove duplicates from string using java 8
Immutable class, remove duplicates from string using Java 8
Create an immutable class to represent the string
Use Java 8 streams to remove duplicates from the string
Convert the string to a character array, use distinct() and collect() to remove duplicates
Q8. Internal working of hash map
Hash map is a data structure that stores key-value pairs and uses a hash function to map keys to indices in an array.
Hash function is used to convert the key into an index in the array
Collisions occur when two keys map to the same index, which can be resolved using separate chaining or open addressing
Load factor is the ratio of number of elements to the size of the array, and affects the performance of hash map
Operations like insert, search and delete have an average time com...read more
Q9. Fallout Mechanism between the microservices
Fallout mechanism between microservices refers to how failures in one microservice can impact other microservices.
Fallout can occur due to cascading failures when one microservice depends on another.
Implementing circuit breakers can help prevent fallout by isolating failures.
Monitoring and alerting systems are crucial for detecting and responding to fallout.
Using asynchronous communication can reduce the impact of fallout by decoupling services.
Implementing retries and timeou...read more
Q10. how do you resolve conflicts?
I resolve conflicts by actively listening, understanding all perspectives, finding common ground, and proposing solutions.
Actively listen to all parties involved
Understand each perspective and the underlying reasons for conflict
Find common ground and areas of agreement
Propose solutions that address the concerns of all parties
Q11. Write code to add elements dynamically
Adding elements dynamically to an array in code
Use push() method to add elements to an array in JavaScript
In Python, use append() method to add elements to a list
In Java, use ArrayList and add() method to dynamically add elements
Q12. Sort the array in one loop
Use quicksort algorithm to sort array in one loop
Use quicksort algorithm to partition array and sort elements
Choose a pivot element and rearrange elements around pivot in one loop
Repeat process for subarrays until entire array is sorted
Q13. what is Hoisting
Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope.
Variable and function declarations are hoisted to the top of their scope during the compilation phase.
Only the declarations are hoisted, not the initializations.
Function declarations take precedence over variable declarations when hoisted.
Q14. What is expected CTC
Expected CTC should be based on industry standards, experience, skills, and location.
Research industry standards for Software Engineer salaries
Consider your experience level and skills when determining expected CTC
Take into account the cost of living in the location of the job
Negotiate based on the job responsibilities and market demand
Q15. delete a node from a bst
To delete a node from a binary search tree (BST), we need to handle three cases: node has no children, node has one child, and node has two children.
Start at the root and traverse the tree to find the node to be deleted.
Handle the three cases: node has no children, node has one child, and node has two children.
For a node with two children, find the inorder successor (smallest node in the right subtree) to replace the node to be deleted.
Q16. Sealed classes in java
Sealed classes in Java restrict inheritance to a predefined set of subclasses.
Sealed classes were introduced in Java 15 to restrict inheritance to a predefined set of subclasses.
Subclasses of a sealed class must be declared in the same file as the sealed class.
Sealed classes are declared using the 'sealed' modifier before the 'class' keyword.
Example: sealed class Shape permits Circle, Square, Triangle;
Q17. internals of hashset
HashSet is a collection that stores unique elements using a hash table.
Uses hashing to store elements
Does not allow duplicate elements
Provides constant-time performance for basic operations like add, remove, contains
More about working at Lowe's
Interview Process at A P Hosiery Industries
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month