Blue Yonder
40+ DMart Interview Questions and Answers
Q1. What is pessimistic locking and optimistic locking?
Pessimistic locking is when a resource is locked for a long time, while optimistic locking is when a resource is locked only when it is being modified.
Pessimistic locking involves locking a resource for a long time to prevent other users from accessing it.
Optimistic locking involves locking a resource only when it is being modified, allowing other users to access it in the meantime.
Pessimistic locking is useful when conflicts are likely to occur, while optimistic locking is u...read more
Q2. 1. What is the difference between Absolute & Relative Xpaths?
Absolute Xpath is the complete path from the root element to the desired element, while Relative Xpath is the path based on the current element.
Absolute Xpath starts with a single slash (/) and is more specific but less flexible.
Relative Xpath starts with a double slash (//) and is more flexible but less specific.
Absolute Xpath is more prone to breaking if the structure of the page changes.
Relative Xpath is easier to maintain and update as it is based on the element's positio...read more
Q3. Which list you will prefer using if you want to create an application that needs constant modification, ArrayList or LinkedList
LinkedList is preferred for constant modification due to faster insertion and deletion times.
LinkedList is preferred for constant modification because it has faster insertion and deletion times compared to ArrayList.
LinkedList allows for easy insertion and deletion of elements without the need to shift other elements, making it more efficient for constant modifications.
ArrayList is better for random access and iterating through elements, while LinkedList is better for frequen...read more
Q4. Check whether two strings are anagrams of each other
Check if two strings are anagrams of each other
Create a character count array for both strings
Compare the character count arrays
If they are equal, the strings are anagrams
Q5. Example for high severity and low priority , and high priority low severity
High severity and low priority: spelling mistake in a non-critical feature. High priority and low severity: UI color change request.
High severity and low priority: spelling mistake in a non-critical feature
High priority and low severity: UI color change request
Q6. List some REST endpoints for a ticket booking system
REST endpoints for a ticket booking system
GET /events - get list of available events
GET /events/{id} - get details of a specific event
POST /events/{id}/tickets - book tickets for an event
GET /bookings - get list of all bookings
GET /bookings/{id} - get details of a specific booking
PUT /bookings/{id} - update a booking
DELETE /bookings/{id} - cancel a booking
Q7. explain internal working of HashMap, what is abstract class
HashMap is a data structure that stores key-value pairs using hashing. An abstract class is a class that cannot be instantiated.
HashMap uses hashing to store key-value pairs for efficient retrieval.
Abstract classes cannot be instantiated and can have abstract methods that must be implemented by subclasses.
Example: HashMap
map = new HashMap<>();
Q8. 3.What is POM in Automation Framework?
POM stands for Page Object Model. It is a design pattern used in automation testing to create a structured and maintainable framework.
POM separates the test scripts from the web elements, making the code more readable and reusable.
Each web page is represented as a separate class, containing its own web elements and methods.
POM improves test maintenance by reducing code duplication and enhancing code reusability.
It enhances collaboration between developers and testers as they ...read more
Q9. Program to find the largest and smallest integer in a program
Program to find the largest and smallest integer in a program
Iterate through the array of integers to find the largest and smallest values
Initialize variables to store the largest and smallest values, update them as needed
Handle edge cases like empty array or array with only one element
Return the largest and smallest values found
Q10. 2. Mention the UNIX Command for Copying the File?
The UNIX command for copying a file is 'cp'.
The 'cp' command is used to create a copy of a file or directory.
The basic syntax of the 'cp' command is 'cp source_file destination_file'.
If the destination file already exists, it will be overwritten unless the '-i' option is used.
To copy a directory and its contents, the '-r' or '-R' option is used.
Examples: 'cp file1.txt file2.txt' or 'cp -r directory1 directory2'
Q11. Java performance and query optimization in oracle
Java performance and query optimization in Oracle
Use prepared statements to avoid SQL injection and improve performance
Use indexes to speed up query execution
Avoid using SELECT * and only select necessary columns
Use connection pooling to reuse database connections
Use caching to reduce database round trips
Tune database parameters like buffer cache and shared pool size
Use profiling tools to identify performance bottlenecks
Q12. Coding questions: 1) To implement HashMap 2) find duplicate count 3) from the list of integers find pairs whos sum matches the target. expecting an optimized solution
Implement HashMap, find duplicate count, and find pairs with sum matching target in an optimized way.
Implement HashMap using arrays and linked lists for collision resolution.
Use a HashMap to store element counts and find duplicates efficiently.
Use a two-pointer approach to find pairs with sum matching the target in O(n) time complexity.
Q13. Unit tesing Difference between Test and TestCase attribute
Test attribute is used to define a test method, while TestCase attribute is used to define a test case class.
Test attribute is used to mark a method as a test method in a test class.
TestCase attribute is used to mark a class as a test case class containing multiple test methods.
Test attribute is used in frameworks like NUnit, JUnit, etc.
TestCase attribute is used in frameworks like NUnit, JUnit, etc.
Q14. Print only duplicate values from a String Without using for loop, use do-while
Print duplicate values from a String using do-while loop
Create a HashSet to store unique values
Use a do-while loop to iterate through the String
Check if the HashSet already contains the current character, if yes, print it as a duplicate
Q15. What is the difference between NoSQL and SQL Database?
NoSQL databases are non-relational databases that do not require a fixed schema, while SQL databases are relational databases that use structured query language.
NoSQL databases are schema-less, allowing for flexible data models.
SQL databases use a fixed schema with tables and rows.
NoSQL databases are horizontally scalable, making them suitable for big data applications.
SQL databases are vertically scalable, meaning they can only handle increased load by increasing the power o...read more
Q16. Make a Java class immutable
To make a Java class immutable, use final keyword and initialize all fields in constructor.
Use final keyword for class and all fields
Initialize all fields in constructor
Do not provide setter methods
Make sure to return a new instance in any method that modifies the state
Q17. Make an class with other objects as immutable
Create a class with other objects as immutable
Use final keyword to make class immutable
Make all fields private and final
Do not provide setter methods, only getter methods
If class contains mutable objects, make sure to return a copy of them in getter methods
Q18. How to go along with employees having diffrence of opinion
Listen to their perspectives, encourage open communication, find common ground, and work towards a compromise.
Encourage open communication to understand each employee's perspective
Listen actively and show empathy towards their opinions
Find common ground and areas of agreement to build upon
Work towards a compromise that addresses the concerns of all parties involved
Q19. How find a element when its in Frame using selenium
To find an element within a frame using Selenium, switch to the frame and then locate the element using appropriate locators.
Use the 'switchTo().frame()' method to switch to the desired frame
Locate the element within the frame using locators like ID, class name, XPath, etc.
Perform actions on the element as required
Q20. Design for shorten url
Shorten URL design involves generating a unique short code for a long URL to save space and improve usability.
Use a hashing algorithm to generate a unique short code for each URL
Store the mapping between short code and long URL in a database
Redirect users to the long URL when they access the short URL
Consider adding expiration time for short URLs to prevent abuse
Provide analytics to track usage of short URLs
Q21. Print only duplicate values from a string
Print duplicate values from a string as an array of strings
Iterate through each character in the string
Use a hashmap to store the frequency of each character
Print characters with frequency greater than 1 as duplicates
Q22. What are the closures in Javascript?
Closures in JavaScript are functions that have access to their own scope, as well as the scope in which they were defined.
Closures allow functions to access variables from an outer function even after the outer function has finished executing.
They are created whenever a function is defined within another function.
Closures are commonly used to create private variables and functions in JavaScript.
Q23. Write a sql query to find out 2nd highest salary
SQL query to find 2nd highest salary
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT clause to retrieve the second row
Q24. Layout optimisation in Xamarin forms
Layout optimisation in Xamarin forms involves improving performance and user experience by efficiently arranging UI elements.
Use ListView instead of StackLayout for long lists to improve performance.
Avoid nesting multiple layouts within each other to reduce complexity.
Utilize Grid layout for more complex UI designs.
Use RelativeLayout for positioning elements relative to each other.
Implement caching mechanisms for frequently used data to reduce loading times.
Q25. Explain about distributed system design
Distributed system design involves breaking down a system into smaller components that communicate and coordinate with each other over a network.
Decompose the system into smaller services that can run independently
Use messaging protocols like MQTT or AMQP for communication
Implement fault tolerance and scalability measures
Consider data consistency and synchronization across nodes
Examples: microservices architecture, Apache Kafka for message streaming
Q26. Levels of EPIC stories
EPIC stories can be divided into three levels: Epics, Features, and User Stories.
Epics are high-level stories that are too big to be completed in a single sprint.
Features are smaller stories that are derived from Epics and can be completed in a single sprint.
User Stories are the smallest stories that are derived from Features and can be completed in a single sprint.
Each level of story is broken down into smaller, more manageable pieces.
For example, an Epic might be 'Improve t...read more
Q27. Write a function to do factorial
Function to calculate factorial of a number
Create a function that takes an integer as input
Use a loop to multiply the number by all integers from 1 to the input number
Return the final result
Q28. 1.What is Bull Whip Effect ?
The Bull Whip Effect refers to the phenomenon of demand variability amplifying as it moves up the supply chain.
It is a supply chain management concept.
Demand fluctuations at the end of the supply chain are magnified as they move upstream.
Causes include lack of communication, forecasting errors, and order batching.
Results in inventory inefficiencies, excess costs, and poor customer service.
Example: A retailer experiences small fluctuations in customer demand, but the manufactu...read more
Q29. Explain about Microservices Architecture
Microservices architecture is an architectural style that structures an application as a collection of loosely coupled services.
Each service is self-contained and can be developed, deployed, and scaled independently.
Services communicate with each other over lightweight protocols like HTTP or messaging queues.
Microservices allow for flexibility, scalability, and resilience in large and complex applications.
Examples of companies using microservices architecture include Netflix,...read more
Q30. Print tables from 1 to 20 in one sequential order
Print tables from 1 to 20 in one sequential order.
Use a loop to iterate from 1 to 20
Inside the loop, multiply the current number with each number from 1 to 10
Print the result in a formatted table
Q31. Experince in developing mobile apps
I have 3 years of experience developing mobile apps for both iOS and Android platforms.
Developed mobile apps using Swift for iOS and Java/Kotlin for Android
Experience with mobile app design principles and user interface development
Worked on integrating APIs and third-party libraries for enhanced functionality
Q32. Reverse a string= "Ecommerce"
To reverse a string 'Ecommerce', you can iterate through the characters in the string and build a new string in reverse order.
Iterate through the characters of the string from end to start
Append each character to a new string to build the reversed string
Return the reversed string as the result
Q33. challenges in project
Managing stakeholder expectations, resource constraints, scope changes, and communication issues are common challenges in projects.
Managing stakeholder expectations is crucial for project success
Dealing with resource constraints can impact project timelines and quality
Handling scope changes requires effective change management processes
Communication issues can lead to misunderstandings and delays
Q34. Explain Batch/Layer Normalization
Batch normalization is a technique used to improve the training of deep neural networks by normalizing the input of each layer.
Batch normalization normalizes the input of each layer by adjusting and scaling the activations.
It helps in reducing internal covariate shift, making training faster and more stable.
Batch normalization is applied to mini-batches of data during training.
Layer normalization is similar to batch normalization but normalizes the activations of each layer i...read more
Q35. Explain symmetry trees in Catboosy
Symmetry trees in Catboost are used to improve the model's performance by exploiting the symmetry of categorical features.
Symmetry trees are a type of decision tree used in Catboost to handle categorical features.
They exploit the symmetry of categorical features to improve the model's performance.
Symmetry trees help in reducing overfitting and improving generalization.
They are particularly useful when dealing with high-cardinality categorical features.
An example of a symmetry...read more
Q36. How to Reverse a String
To reverse a string, iterate through the characters and swap the first and last characters until reaching the middle.
Create a character array from the input string
Use two pointers, one starting from the beginning and one from the end, and swap the characters at those positions
Continue swapping until the pointers meet in the middle
Q37. Explain microservices architecture.
Microservices architecture is an architectural style that structures an application as a collection of loosely coupled services.
Each service is self-contained and can be developed, deployed, and scaled independently.
Services communicate with each other over lightweight protocols like HTTP or messaging queues.
Microservices allow for better scalability, flexibility, and resilience compared to monolithic architectures.
Examples of companies using microservices architecture includ...read more
Q38. explains Joins in sql
Joins in SQL are used to combine rows from two or more tables based on a related column between them.
Joins are used to retrieve data from multiple tables based on a related column
Types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column
Q39. Manage difficult customer
Handle difficult customers by listening, empathizing, setting boundaries, and finding solutions.
Listen actively to understand their concerns
Empathize with their emotions and frustrations
Set clear boundaries for acceptable behavior
Find mutually beneficial solutions to resolve the issue
Q40. write a For loop
A For loop is used to iterate over a collection of items and perform a set of actions for each item.
Initialize a counter variable before the loop
Set the condition for the loop to continue based on the counter variable and the length of the array
Increment the counter variable after each iteration
Access each element in the array using the counter variable
Q41. Previous experince
Top HR Questions asked in DMart
Interview Process at DMart
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month