Saviynt
10+ Delhivery Interview Questions and Answers
Q1. What is the difference between normal function and arrow function?
Arrow functions are more concise and have lexical scoping, while normal functions have their own 'this' value.
Arrow functions do not have their own 'this' value, they inherit it from the parent scope.
Arrow functions are more concise and have implicit return.
Normal functions are more flexible and can be used as constructors.
Arrow functions cannot be used as constructors.
Arrow functions do not have 'arguments' object.
Q2. Given a counter code in class component, convert it to functional component
Convert a counter code from class component to functional component
Use useState hook to manage state in functional component
Remove 'this' keyword and constructor from the code
Update event handlers to use arrow functions or useCallback hook
Q3. Write a code in react to post some data to a public url
Code snippet to post data to a public URL in React
Use the fetch API to make a POST request to the public URL
Convert the data to JSON before sending it in the request body
Handle the response from the server accordingly
Q4. Map two array of objects and display the results in lists using react
Map two arrays of objects and display results in lists using React
Use the map function to iterate over each array of objects
Render the results in separate lists using JSX
Example: array1.map(item =>
- {item.name} )
Q5. What is CORS in web development?
CORS stands for Cross-Origin Resource Sharing and is a security feature implemented by browsers to prevent unauthorized access to resources on a different domain.
CORS allows servers to specify who can access their resources by adding specific HTTP headers to their responses.
It is used to protect against cross-site request forgery (CSRF) attacks.
For example, if a frontend application on domain A tries to make a request to a backend API on domain B, CORS will block the request ...read more
Q6. Custom HashMap Implementation including some Efficient code to write to Search for a Key Value Pair of a Composite Object like Object within an Object within a Main Object.
Implement a custom HashMap to efficiently search for a key value pair of a composite object.
Create a custom HashMap class with methods for adding key value pairs and searching for a specific key.
Implement a hash function to calculate the index of the key in the HashMap array.
For composite objects, override the hashCode and equals methods to ensure proper comparison and retrieval.
Q7. Call stack and heap difference?
Call stack stores function calls and local variables, while heap stores dynamic memory allocation.
Call stack is used for function calls and local variables
Heap is used for dynamic memory allocation
Call stack is limited in size and has a fixed memory allocation, while heap is larger and can grow dynamically
Example: Call stack is used to keep track of function calls in a recursive function, while heap is used to allocate memory for objects
Q8. Longest Increasing Subsequence
Find the length of the longest increasing subsequence in an array.
Use dynamic programming to keep track of the longest increasing subsequence ending at each index.
Iterate through the array and update the longest increasing subsequence length for each index.
Return the maximum length found in the dynamic programming array.
Q9. Linux Commands for DevOps
Linux commands commonly used in DevOps for automation and system management.
1. ls - List directory contents
2. cd - Change directory
3. pwd - Print working directory
4. mkdir - Make directory
5. rm - Remove files or directories
6. cp - Copy files or directories
7. mv - Move files or directories
8. grep - Search text patterns
9. ps - Display process information
10. top - Display and update sorted information about processes
11. chmod - Change file permissions
12. chown - Change file owne...read more
Q10. OKTA Integration experience and details
I have 2 years of experience integrating OKTA with various applications.
Implemented SSO using OKTA for multiple web applications
Configured user provisioning and deprovisioning with OKTA APIs
Integrated OKTA with Active Directory for user authentication
Q11. match two string
Matching two strings based on their content
Use built-in string comparison functions like equals() or compareTo()
Consider case sensitivity when comparing strings
Handle null or empty strings appropriately
Interview Process at Delhivery
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month