Publicis Sapient
400+ DMart Interview Questions and Answers
Q101. what are 3 steps for using function in c?
Three steps for using functions in C.
Declare the function with its return type, name, and parameters.
Define the function by writing the code for it.
Call the function by using its name and passing arguments if necessary.
Q102. What is a stack and various operations on it?
A stack is a data structure that follows the Last In First Out (LIFO) principle.
Push: adds an element to the top of the stack
Pop: removes the top element from the stack
Peek: returns the top element without removing it
IsEmpty: checks if the stack is empty
Size: returns the number of elements in the stack
Q103. Difference between method overloading and methode overriding ?
Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a subclass method with the same name and parameters as a superclass method.
Method overloading is used to provide different ways of calling the same method with different parameters.
Method overriding is used to provide a specific implementation of a method in a subclass that is already defined in the superclass.
Method overloading is resolved at compile-time ba...read more
Q104. Difference between switch case and if else statement?
Switch case is used for multiple conditions while if else is used for binary conditions.
Switch case is faster than if else for multiple conditions.
If else can handle complex conditions while switch case cannot.
Switch case can only compare values of the same data type.
If else can handle null values while switch case cannot.
Example: switch (day) { case 1: console.log('Monday'); break; case 2: console.log('Tuesday'); break; default: console.log('Invalid day'); }
Example: if (age ...read more
Q105. Sorting the list of strings based on the count of their occurrences/
Sorting a list of strings based on their occurrence count.
Create a dictionary to store the count of each string.
Use the dictionary to sort the list based on the count of occurrences.
If two strings have the same count, sort them alphabetically.
Return the sorted list.
Q106. How to swap numbers without using temporary variable
Swapping numbers without using a temporary variable
Use addition and subtraction to swap the numbers
Example: a = 5, b = 10. a = a + b (15), b = a - b (5), a = a - b (10)
Alternatively, use bitwise XOR operation to swap the numbers
Example: a = 5, b = 10. a = a ^ b (15), b = a ^ b (5), a = a ^ b (10)
Q107. what is function overloading and overriding (difference between them)
Function overloading and overriding are concepts in object-oriented programming.
Function overloading is when multiple functions with the same name but different parameters are defined in a class.
Function overriding is when a derived class provides a different implementation for a method that is already defined in the base class.
Overloading is resolved at compile-time based on the number, type, and order of arguments, while overriding is resolved at runtime based on the object...read more
Q108. Diffrences between list and tuples, OOPS concepts, Decorators, Mutable vs Immutable, list and tuple which is faster, lamda, reduce, filter,generators and iter objects.
Lists and tuples are both data structures in Python, but lists are mutable while tuples are immutable. OOP concepts include inheritance, encapsulation, and polymorphism. Decorators are used to modify functions or methods. Lambda functions are anonymous functions. Reduce, filter, generators, and iter objects are all related to functional programming in Python.
Lists are mutable, meaning they can be changed after creation. Tuples are immutable, meaning they cannot be changed aft...read more
Q109. Write a Java String program to replace the characters. Write a Java program for Encapsulation. What is the difference between Comparator and Comparable? In between an Interview, the screen was abruptly closed. ...
read moreJava String program to replace characters, Encapsulation program, Comparator vs Comparable difference
For Java String program to replace characters, use the replace() method to replace specific characters in a string.
For Encapsulation in Java, use private access modifiers to restrict access to class variables and use public getter and setter methods to access and modify them.
Comparator and Comparable are interfaces used for sorting objects in Java. Comparable is implemented by...read more
Q110. 1. Program for Inserting random number in an array and then sort in ascending and descending order. 2. Dynamic x path related questions 3. Maven related questions 4. TestNG annotations..etc 5. Program for rever...
read moreQ111. Is JavaScript a statically typed or dynamically typed language?
JavaScript is a dynamically typed language.
Variables can hold different data types at different times
Type checking is done at runtime
Example: var x = 5; x = 'hello';
Q112. Explain Random forest. What is gini impurity.
Random forest is an ensemble learning method that constructs a multitude of decision trees and outputs the mode of the classes. Gini impurity is a measure of impurity or randomness used in decision trees.
Random forest is a collection of decision trees that are trained on different subsets of the data.
Each decision tree in the forest is trained on a random subset of the features.
The final prediction is made by taking the mode of the predictions of all the trees.
Gini impurity i...read more
Q113. What Volume of data have you handled in your POCs ?
I have handled terabytes of data in my POCs, including data from various sources and formats.
Handled terabytes of data in POCs
Worked with data from various sources and formats
Used tools like Hadoop, Spark, and SQL for data processing
Q114. what is the need for @Service annotation?
The @Service annotation is used in Spring framework to indicate that a class is a service component.
Used to mark a class as a service component in Spring framework
Helps in auto-detection and auto-configuration of Spring beans
Facilitates dependency injection and inversion of control
Can you handle pressure?
What is your biggest regret?
Q116. What is difference between apache normal restart and graceful restart?
Apache normal restart stops and starts the server, while graceful restart allows current connections to finish before restarting.
Normal restart stops and starts the server immediately, causing all active connections to be terminated.
Graceful restart allows the server to continue serving current connections until they are finished, then starts a new instance of the server.
Graceful restart is useful for minimizing downtime and avoiding disruption to users.
Normal restart is fast...read more
Q117. What is Difference between C,C++?
C is a procedural programming language while C++ is an object-oriented programming language.
C is a low-level language while C++ is a high-level language.
C++ supports object-oriented programming concepts like classes, inheritance, and polymorphism.
C++ has better support for exception handling and templates.
C++ is more complex than C and requires more memory.
C++ is used for developing applications like video games, while C is used for developing operating systems and system sof...read more
Q118. Do you know core values of Sapient?
Yes, the core values of Sapient are People, Collaboration, Innovation, and Excellence.
People - Putting people first, valuing diversity and inclusion
Collaboration - Working together as a team, fostering open communication
Innovation - Encouraging creativity, embracing new ideas and technologies
Excellence - Striving for high quality, continuous improvement
Q119. What tools do you use to track your projects?
I use a combination of project management software, spreadsheets, and communication tools to track my projects.
Project management software: I utilize tools like Jira, Trello, or Asana to create and manage project tasks, assign responsibilities, and track progress.
Spreadsheets: I use Excel or Google Sheets to create project timelines, track milestones, and monitor project budgets.
Communication tools: I rely on tools like Slack or Microsoft Teams to collaborate with team member...read more
Q120. Missing number in sequence(choose the best algorithm)
Algorithm to find missing number in a sequence
Use mathematical formula for arithmetic or geometric sequence
For random sequence, use sorting and iteration
Consider edge cases like empty sequence or multiple missing numbers
Q121. Co-routines how they are light weight?
Co-routines are lightweight because they are non-blocking and do not require a separate thread.
Co-routines are cooperative, meaning they can pause and resume execution without blocking the thread.
They use fewer resources than threads because they do not require a separate stack or context switch.
Co-routines can be used to perform asynchronous operations without the overhead of creating and managing threads.
Example: In Android, co-routines can be used to perform network reques...read more
Q122. 1. Fetch data from api and display in UI list format
Answering how to fetch data from API and display in UI list format for Reactjs Developer interview.
Use fetch or axios to fetch data from API
Store the data in state or Redux store
Map through the data and display in UI list format
Handle loading and error states
Example: fetch('https://api.example.com/data').then(response => response.json()).then(data => setData(data))
Example: {data.map(item =>
- {item.name} )}
Q123. How to switch on and off the bulb by one button using JavaScript
Use JavaScript to switch on and off a bulb with one button.
Create a variable to store the state of the bulb (on/off)
Add an event listener to the button
Toggle the state of the bulb variable on each button click
Update the bulb image or class based on the state of the bulb variable
Q124. write sql code to get the city1 city2 distance of table if city1 and city2 tables can repeat
SQL code to get the city1 city2 distance of table with repeating city1 and city2 values
Use a self join on the table to match city1 and city2
Calculate the distance between the cities using appropriate formula
Consider using a subquery if needed
Explain the concept of ACID properties in DBMS?
Q126. What is interface and abstract class?
Interface and abstract class are both used for abstraction in object-oriented programming.
An interface is a collection of abstract methods that define a contract for a class to implement.
An abstract class is a class that cannot be instantiated and may contain abstract methods.
Interfaces are used to achieve multiple inheritance in Java.
Abstract classes can have non-abstract methods and instance variables.
An example of an interface is the Comparable interface in Java.
An example...read more
Q127. Write a program to add two numbers without using + operator
Program to add two numbers without using + operator
Use bitwise operators like XOR, AND, and left shift
Add the two numbers using bitwise operators and carry over the result
Repeat until there is no carry over
Q128. Find the output:- a=5;b=4;c=++a+b--; find c?
Find the output of c=++a+b-- where a=5 and b=4.
The value of a is incremented by 1 before the addition operation
The value of b is decremented by 1 after the addition operation
The final value of c is 10
The value of a becomes 6 and the value of b becomes 3
Q129. what is the difference between cluster and thread ?
Cluster is a group of processes that share the same resources while thread is a lightweight process that shares the same memory.
Cluster is used for scaling and load balancing while thread is used for improving performance.
Cluster can run on multiple machines while thread runs within a single process.
Cluster requires inter-process communication while thread does not.
Examples of cluster include PM2 and Node.js cluster module while examples of thread include worker threads in No...read more
Q130. How to create table using html, how to color one row, how to merge specific coloum
To create a table using HTML, color one row, and merge specific columns, use <table>, <tr>, <td>, and <th> tags with CSS styling.
Create a table using <table>, <tr>, <td>, and <th> tags
Color one row using CSS by targeting the <tr> element with a specific class or inline style
Merge specific columns using the colspan attribute in the <td> or <th> tags
Q131. What is join in sql, how to join two table and what types of join used
Join in SQL is used to combine data from two or more tables based on a related column between them.
Types of joins: Inner join, Left join, Right join, Full outer join, Cross join
Syntax: SELECT * FROM table1 JOIN table2 ON table1.column = table2.column
Example: SELECT * FROM customers JOIN orders ON customers.customer_id = orders.customer_id
Q132. if any data loss issue, how will you approach to different teams and the your team
I would approach the issue by communicating with all relevant teams and creating a plan to recover the lost data.
Identify the cause of the data loss
Notify all relevant teams and stakeholders
Create a plan to recover the lost data
Implement the plan and monitor progress
Communicate updates to all stakeholders
Q133. what is difference repartition and coalesce
Repartition increases the number of partitions in a DataFrame, while coalesce reduces the number of partitions without shuffling data.
Repartition involves a full shuffle of the data across the cluster, which can be expensive.
Coalesce minimizes data movement by only creating new partitions if necessary.
Repartition is typically used when increasing parallelism or evenly distributing data, while coalesce is used for reducing the number of partitions without a full shuffle.
Exampl...read more
Q134. How is Magento CMS tool different from WordPress
Magento CMS is an e-commerce platform while WordPress is a content management system.
Magento is specifically designed for e-commerce websites, while WordPress is more versatile and can be used for various types of websites.
Magento offers advanced features for managing products, inventory, and payments, while WordPress focuses more on content creation and management.
Magento has a steeper learning curve and requires technical expertise, while WordPress is more user-friendly and...read more
Q135. How would you manage the drift in terraform if services are added manually?
To manage drift in Terraform due to manually added services, use Terraform import, state management, and version control.
Use Terraform import to bring manually added services under Terraform management.
Regularly update Terraform state file to reflect the current state of infrastructure.
Utilize version control to track changes made outside of Terraform.
Implement automated checks to detect and reconcile drift in infrastructure.
Q136. WAP to check if no is palindrom or not?
A program to check if a given number is a palindrome or not.
Convert the number to a string.
Reverse the string and compare it with the original string.
If they are equal, the number is a palindrome.
If not, the number is not a palindrome.
Q137. Is live data is life cycle aware. If it's aware what does ViewModel do?
Yes
LiveData is lifecycle aware and can be used to observe changes in data.
ViewModel provides a way to store and manage UI-related data across configuration changes.
ViewModel can hold LiveData objects to provide data to the UI.
LiveData and ViewModel work together to ensure data consistency and prevent memory leaks.
Q138. 1. What is DoR 2. Difference between Factoring and Bill discounting 3. Explain O2C cycle 4. How does T&M and FP process works 5. Important KPIs in an IT industry
Answers to questions related to finance and IT industry
DoR stands for Declaration of Readiness, which is a legal document that indicates a party's readiness to proceed with a legal action.
Factoring is a financial transaction where a company sells its accounts receivable to a third party at a discount, while bill discounting is a short-term borrowing arrangement where a company borrows money from a bank by selling its bills before the due date.
O2C cycle refers to the order-to-...read more
Q139. I’m given 8 sticks to use to make two squares and four right angled triangles
Q140. Can one edit standard libraries of C?
Yes, one can edit standard libraries of C.
Standard libraries of C are typically provided as source code, allowing developers to modify them.
Modifying standard libraries can be useful for fixing bugs, adding new features, or optimizing performance.
However, it is generally recommended to avoid modifying standard libraries directly to maintain compatibility and portability.
Instead, developers can create their own libraries or use existing third-party libraries for customization.
Q141. How will you design/configure a cluster if you have given 10 petabytes of data.
Designing/configuring a cluster for 10 petabytes of data involves considerations for storage capacity, processing power, network bandwidth, and fault tolerance.
Consider using a distributed file system like HDFS or object storage like Amazon S3 to store and manage the large volume of data.
Implement a scalable processing framework like Apache Spark or Hadoop to efficiently process and analyze the data in parallel.
Utilize a cluster management system like Apache Mesos or Kubernet...read more
Q142. What is OS, explain threading, explain paging, database transactions - acid properties, 2-3 questions related to computer networks
Explanation of OS, threading, paging, database transactions (ACID properties), and computer networks.
OS (Operating System) is a software that manages computer hardware resources and provides services for computer programs.
Threading involves the ability of a program to execute multiple parts concurrently.
Paging is a memory management scheme that eliminates the need for contiguous allocation of physical memory.
Database transactions follow ACID properties - Atomicity, Consistenc...read more
Q143. Sealed Classes where do we use?
Sealed classes are used to restrict inheritance and provide a fixed set of subclasses.
Sealed classes are used when we want to restrict the number of subclasses that can be created.
They are useful when we have a fixed set of subclasses and we want to ensure that no other subclasses are created.
Sealed classes can be used in conjunction with when expressions to provide exhaustive pattern matching.
They are commonly used in Kotlin's own standard library, such as the Result class.
Questions were asked based on Joins in DBMS.
Q145. How do you act on the feed back given to you? Have you ever gave feedback on team members? what aspects do you consider before giving feedback?
Q146. Comparator with and without java 8
Comparator in Java 8 provides default methods and lambda expressions for sorting.
Comparator in Java 8 can be implemented using lambda expressions.
Comparator in Java 8 provides default methods like reversed() and thenComparing() for sorting.
Comparator in pre-Java 8 versions can be implemented using anonymous inner classes.
Comparator in pre-Java 8 versions requires more code to implement compared to Java 8.
Example: Sorting a list of strings in ascending order using Java 8 Compa...read more
Q147. Write Singleton classes Write Rest API Find the repeating character in a string. Variables are inherited or not. Exception Handling Spring AOP Exception handling Completables future
Answering questions related to Singleton classes, Rest API, repeating characters in a string, variable inheritance, and exception handling.
Singleton classes are used to ensure that only one instance of a class is created and provide a global point of access to it.
Rest API is a way of building web services that are lightweight, scalable, and maintainable.
To find the repeating character in a string, we can use a hashmap to store the frequency of each character and then iterate ...read more
Q148. When will you decide to use repartition and coalesce?
Repartition is used for increasing partitions for parallelism, while coalesce is used for decreasing partitions to reduce shuffling.
Repartition is used when there is a need for more partitions to increase parallelism.
Coalesce is used when there are too many partitions and need to reduce them to avoid shuffling.
Example: Repartition can be used before a join operation to evenly distribute data across partitions for better performance.
Example: Coalesce can be used after a filter...read more
Q149. Inheritence in java?
Inheritance in Java allows a class to inherit properties and methods from another class.
Inheritance is achieved using the 'extends' keyword.
The class that is being inherited from is called the superclass or parent class.
The class that inherits from the superclass is called the subclass or child class.
Subclasses can access the public and protected members of the superclass.
Inheritance promotes code reusability and allows for the creation of hierarchical relationships.
Q150. What are the common file formats used in data storages? Which one is best for compression?
Common file formats used in data storages include CSV, JSON, Parquet, Avro, and ORC. Parquet is best for compression.
CSV (Comma-Separated Values) - simple and widely used, but not efficient for large datasets
JSON (JavaScript Object Notation) - human-readable and easy to parse, but can be inefficient for storage
Parquet - columnar storage format that is highly efficient for compression and query performance
Avro - efficient binary format with schema support, good for data serial...read more
Q151. Write a Function to reverse a Linked list Using Recursion
Q152. Write a programme for Fibonacci series, length of string
This program generates a Fibonacci series up to a given length.
Use an array to store the Fibonacci series
Initialize the first two elements of the array as 0 and 1
Use a loop to generate the subsequent elements of the series
Stop the loop when the desired length is reached
Q153. Which document do you put the DFD?
DFD is typically documented in a Data Flow Diagram document.
DFD is a visual representation of how data flows through a system.
It shows the inputs, processes, and outputs of a system.
DFD can be included in a requirements document or a system design document.
It is important to keep the DFD up-to-date as the system evolves.
Examples of tools used to create DFDs include Microsoft Visio and Lucidchart.
Q154. What technologies you have worked on?
I have worked on various technologies including data analysis tools, project management software, and database management systems.
Data analysis tools: Excel, Tableau, Power BI
Project management software: JIRA, Trello
Database management systems: SQL Server, Oracle
Programming languages: Python, R
Business intelligence tools: SAP BusinessObjects, QlikView
Q155. How the CI-cd process can be implemented for SFCC?
CI/CD process can be implemented for SFCC using Jenkins and Salesforce DX.
Use Jenkins to automate the build and deployment process
Use Salesforce DX to manage the source code and version control
Create a pipeline in Jenkins to build, test and deploy the code
Use Git for version control and create branches for each feature
Use scratch orgs for testing and validation
Automate the testing process using tools like Selenium or Provar
Use continuous integration to ensure code quality and...read more
Explain different levels of data abstraction in a DBMS.
Q157. What is controlled and uncontrolled component
Controlled components are inputs whose value is controlled by React, while uncontrolled components are inputs whose value is controlled by the DOM.
Controlled components are typically used in forms where the input value is controlled by React state.
Uncontrolled components are often used for inputs that do not need to be controlled by React.
Examples of controlled components include input fields with value and onChange props specified.
Examples of uncontrolled components include ...read more
Q158. What is difference between reload and restart?
Reload refers to reloading the configuration without restarting the service, while restart refers to stopping and starting the service.
Reload is a process of reloading the configuration of a service without stopping it completely.
Restart is a process of stopping and starting the service completely.
Reload is faster than restart as it does not require the service to be completely stopped.
Reload is useful when making minor changes to the configuration, while restart is required ...read more
Q159. Write a program in Scala/python/Java to print star pattern
Q160. How does viewmodel survive when activity is destroyed on configuration?
The ViewModel survives configuration changes by being retained by the system.
ViewModels are designed to survive configuration changes like screen rotations or language changes.
When an activity is destroyed and recreated, the ViewModel is not destroyed and retains its data.
The ViewModel is associated with the activity's lifecycle and is retained until the activity is finished.
The retained ViewModel instance can be accessed by the newly created activity to restore its state.
Q161. what are Angular routing, component life cycle hooks, dir ctives, guards
Angular routing, component life cycle hooks, directives, guards are key features of Angular framework.
Angular routing is used to navigate between different components and views in an Angular application.
Component life cycle hooks are methods that are called at different stages of a component's life cycle, such as OnInit, OnDestroy, etc.
Directives are used to add behavior to HTML elements, such as ngIf, ngFor, etc.
Guards are used to protect routes in an Angular application, su...read more
Q162. Explain CICD process/architecture you implemented ?
Implemented CICD process using Jenkins, Git, Docker and Kubernetes.
Used Jenkins for continuous integration and continuous delivery
Git for version control and code management
Docker for containerization and portability
Kubernetes for container orchestration and scaling
Implemented automated testing and deployment pipelines
Enabled faster and more reliable software delivery
Reduced manual errors and increased efficiency
Q163. how is data partitioned in pipeline
Data partitioning in a pipeline involves dividing data into smaller chunks for processing and analysis.
Data can be partitioned based on a specific key or attribute, such as date, location, or customer ID.
Partitioning helps distribute data processing tasks across multiple nodes or servers for parallel processing.
Common partitioning techniques include range partitioning, hash partitioning, and list partitioning.
Example: Partitioning sales data by region to analyze sales perform...read more
Q164. What are data types and pointers
Data types are classifications of data that determine the type of values that can be stored and manipulated. Pointers are variables that store memory addresses.
Data types include integers, floating-point numbers, characters, and booleans.
Pointers are used to store memory addresses of variables or objects.
Example: int num = 10; int *ptr = # // ptr stores the memory address of num
Q165. why you want to work as a java developer and where do you see yourself in 5 yrs from now?
I want to work as a Java developer because of my passion for coding and problem-solving. In 5 years, I see myself leading a team and working on innovative projects.
Passion for coding and problem-solving
Opportunity to work on diverse projects
Career growth and leadership opportunities
Continuous learning and skill development
Potential to work on innovative technologies
Q166. What is the explanation of the coding exercise and the associated unit tests?
The coding exercise involves implementing a specific feature or functionality and writing unit tests to ensure its correctness.
Explain the purpose of the coding exercise and what is expected to be implemented.
Describe the approach taken to solve the problem and any challenges faced during implementation.
Discuss the design decisions made and how they impact the overall code quality.
Explain the unit tests written to validate the functionality of the implemented code.
Provide exa...read more
Q167. Difference between ViewBag and ViewData in MVC ?
ViewBag and ViewData are used to pass data from controller to view in MVC. ViewBag uses dynamic properties while ViewData uses dictionary.
ViewBag is a dynamic object while ViewData is a dictionary object.
ViewBag is a property of the Controller base class while ViewData is a property of the ViewDataDictionary class.
ViewBag is used to pass data from controller to view while ViewData is used to pass data from controller to view and between views.
Example of using ViewBag: ViewBag...read more
Q168. Microservice Architecture vs monolith Architechture
Microservice architecture allows for greater scalability and flexibility compared to monolith architecture.
Microservices are smaller, independent components that can be developed and deployed separately
Monoliths are a single, large application with tightly coupled components
Microservices allow for easier maintenance and updates
Monoliths can be simpler to develop and deploy initially
Examples of microservice architecture include Netflix and Amazon
Examples of monolith architectu...read more
Q169. Why we use security groups in AWS?
Security groups are used to control inbound and outbound traffic for EC2 instances in AWS.
Security groups act as virtual firewalls for EC2 instances.
They allow or deny traffic based on rules defined by the user.
They can be assigned to multiple instances.
They are stateful, meaning they keep track of the traffic flow and allow the response traffic.
They can be used to restrict access to specific ports or IP addresses.
They are a fundamental component of AWS security.
Example: A se...read more
Q170. Where are the job locations of Publicis sapient in India?
Publicis Sapient has job locations in multiple cities across India.
Publicis Sapient has offices in Bangalore, Gurgaon, Mumbai, and Chennai.
They also have a presence in Noida, Hyderabad, and Jaipur.
The company offers remote work options as well.
Job locations may vary depending on the specific role and project.
Q171. What is Hosting in JS? give one example
Hosting in JS refers to the behavior of variable declarations being moved to the top of their containing scope during the compilation phase.
Variable declarations are 'hoisted' to the top of their scope, regardless of where the actual declaration occurs.
Only the declarations are hoisted, not the initializations.
Example: var x; console.log(x); var x = 5; // Output: undefined
Q172. Given the list of words, write the Python program to print the most repeating substring out of all words.
Python program to find the most repeating substring in a list of words.
Iterate through each word in the list
Generate all possible substrings for each word
Count the occurrences of each substring using a dictionary
Find the substring with the highest count
Q173. Sub components and qualifiers in Dagger 2
Sub components and qualifiers are used in Dagger 2 for modularization and dependency injection.
Sub components allow for modularization of dependencies within a larger component.
Qualifiers are used to differentiate between multiple dependencies of the same type.
Sub components are created using the @Subcomponent annotation.
Qualifiers are created using custom annotations with @Qualifier.
Example: @Named("example") String exampleString;
Example: @Subcomponent(modules = {ExampleModu...read more
Q174. How do you schedule a pod in a certain node in k8s
To schedule a pod in a certain node in k8s, use nodeSelector in pod spec.
Add a label to the node you want to schedule the pod on
Specify the label in the pod spec using nodeSelector
Example: nodeSelector: {key: value}
Q175. What is API testing and how can the body of a response be validated using automation
Q176. Sql query performance and optimisation ways
Tips for SQL query performance and optimization
Use indexes to speed up query execution
Avoid using SELECT * and only select necessary columns
Use JOINs instead of subqueries
Avoid using functions in WHERE clauses
Use EXPLAIN to analyze query performance
Normalize database tables to reduce redundancy
Use stored procedures for frequently executed queries
Q177. how do you achieve data security when saving data persistanly.
Data security can be achieved through encryption, access controls, backups, and regular security audits.
Encrypt sensitive data using strong encryption algorithms.
Implement access controls to restrict unauthorized access to the data.
Regularly backup the data to prevent data loss.
Conduct regular security audits to identify and fix vulnerabilities.
Use secure protocols and communication channels for data transfer.
Implement secure coding practices to prevent common security vulner...read more
Q178. how does singleton pattern is used in spring. how do you connect the database in spring
Singleton pattern in Spring ensures that a class has only one instance and provides a global point of access to it.
In Spring, singleton pattern is used by default for all beans created through the Spring container.
This means that by default, Spring beans are singletons and only one instance is created and shared throughout the application.
To connect to a database in Spring, you can use the JDBC template or ORM frameworks like Hibernate.
You can configure the database connectio...read more
Q179. What is NAT and how to configure it?
NAT stands for Network Address Translation. It is used to translate private IP addresses to public IP addresses.
NAT is used to allow devices with private IP addresses to access the internet using a public IP address.
It can be configured on a router or firewall.
There are three types of NAT: static, dynamic, and port forwarding.
Static NAT maps a private IP address to a public IP address permanently.
Dynamic NAT maps a private IP address to a public IP address temporarily.
Port fo...read more
Q180. Which CIDR you are using in your VPC?
We are using CIDR block 10.0.0.0/16 in our VPC.
Our VPC is using the private IP address range of 10.0.0.0/16
This CIDR block allows us to have up to 65,536 IP addresses
We have divided the VPC into multiple subnets using smaller CIDR blocks
Q181. Write your own algorithm to find the numbers from an integer array
Algorithm to find numbers from an integer array
Iterate through the array and check each element
If the element is a number, add it to a new array
Return the new array with all the numbers
Q182. 8 metals bolls are similar ?
Yes, they are similar.
All 8 metal balls are of the same material.
They have the same size and weight.
They have the same physical properties.
They are interchangeable in any given situation.
Q183. Describe the flow of SFRA architecture?
SFRA architecture follows a modular approach with a clear separation of concerns.
SFRA stands for Storefront Reference Architecture
It is built on top of the SiteGenesis architecture
It follows a modular approach with a clear separation of concerns
It uses a combination of server-side and client-side technologies
It provides a responsive design that works across multiple devices
It includes pre-built cartridges for common functionality
It allows for customization through the use of ...read more
Q184. Simple task to fetch cart and display items in the cart
Fetch cart items and display them
Create a function to fetch cart items from database
Display the items in the cart on the user interface
Handle empty cart scenarios
Consider pagination for large number of items
Q185. write a function to find nth Fibonacci number
Q186. What do you know about AEM?
AEM is a content management system used for creating and managing digital content.
AEM stands for Adobe Experience Manager.
It is a comprehensive content management system that allows users to create, manage, and deliver digital content across multiple channels.
AEM provides a user-friendly interface for content creation and editing, with features like drag-and-drop functionality and in-context editing.
It offers robust capabilities for content personalization, targeting, and ana...read more
Q187. What CMS tools have you used?
I have experience with various CMS tools.
I have used WordPress, Drupal, and Joomla for website content management.
I have also worked with Adobe Experience Manager (AEM) for enterprise-level CMS.
I am familiar with HubSpot CMS for inbound marketing purposes.
I have utilized Contentful and Prismic for headless CMS implementations.
Additionally, I have experience with Shopify and WooCommerce for e-commerce CMS solutions.
Q188. Whats is polymorphisom?
Polymorphism is the ability of an object to take on many forms.
It allows objects of different classes to be treated as if they were objects of the same class.
It is achieved through method overriding and method overloading.
Example: A shape class can have multiple subclasses like circle, square, etc. and all can be treated as shapes.
Example: A method can have different implementations in different classes but with the same name and signature.
Q189. Design Patterns? Types which all worked on
Design patterns are reusable solutions to common problems in software design. Some types include Singleton, Factory, Observer, and Strategy patterns.
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Factory pattern creates objects without specifying the exact class of object that will be created.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notif...read more
Q190. How the caching works for in sfra?
Sfra uses caching to improve performance by storing frequently accessed data in memory.
Sfra uses a caching framework called 'Cache' which is based on the Node.js 'lru-cache' package.
Cache can store data in memory or on disk, and can be configured to expire data after a certain amount of time or when memory usage reaches a certain threshold.
Sfra uses caching for various types of data, such as site preferences, product data, and customer data.
Caching can be customized by develo...read more
Q191. What is static variable?
A variable that is associated with a class rather than with instances of the class.
Static variables are declared using the static keyword.
They are initialized only once, at the start of the program execution.
They retain their value throughout the program's execution.
They can be accessed without creating an instance of the class.
Example: public static int count = 0;
Q192. What are member functions?
Member functions are functions that are defined inside a class and can access the class's private and protected members.
Member functions are also known as methods.
They can be used to manipulate the data members of an object.
They can be overloaded, meaning multiple functions with the same name but different parameters can exist within a class.
They can be declared as const, meaning they do not modify the object's state.
Example: class Car { void start(); void stop(); };
Example: ...read more
Q193. What is inherritance ?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reusability and saves time and effort in writing new code.
The existing class is called the parent or base class, and the new class is called the child or derived class.
The child class inherits all the properties and methods of the parent class and can also add its own unique properties and methods.
For example, a class 'An...read more
Q194. What is the difference between spring and spring boot ?
Spring is a framework for building Java applications, while Spring Boot is an extension that simplifies the setup and development process.
Spring is a comprehensive framework that provides features like dependency injection, aspect-oriented programming, and more.
Spring Boot is an extension of the Spring framework that simplifies the setup and development of Spring applications by providing defaults for configuration.
Spring Boot includes embedded servers like Tomcat, Jetty, or ...read more
Q195. How do you check the OS on which the selenium program is running
You can check the OS on which the Selenium program is running by using the 'System.getProperty()' method in Java.
Use 'System.getProperty('os.name')' to get the name of the operating system
Use 'System.getProperty('os.version')' to get the version of the operating system
Use 'System.getProperty('os.arch')' to get the architecture of the operating system
Q196. What is debouncing and throttling in JS
Debouncing and throttling are techniques used in JavaScript to limit the number of times a function is called.
Debouncing delays the execution of a function until a certain amount of time has passed without it being called again.
Throttling limits the rate at which a function can be called, ensuring it is not called more than once within a specified time interval.
Q197. what is accessibility and explain the new concepts in es6
Accessibility refers to the design of products, devices, services, or environments for people with disabilities.
ES6 introduced new concepts like let and const for variable declaration, arrow functions, template literals, destructuring, and classes.
let and const are block-scoped variables, unlike var which is function-scoped.
Arrow functions provide a shorter syntax for writing function expressions.
Template literals allow for easier string interpolation and multiline strings.
De...read more
Q198. What is Boolean Search?
Boolean search is a type of search that allows users to combine keywords with operators such as AND, OR, and NOT to produce more relevant results.
Boolean search is commonly used in search engines and databases.
It helps to narrow down search results by using specific keywords and operators.
For example, searching for 'cats AND dogs' will only show results that include both keywords.
On the other hand, searching for 'cats NOT dogs' will exclude any results that include the keywor...read more
Q199. 1. Command for find the 30 days old file in linux
Use the find command with the -mtime option to find files that are 30 days old in Linux.
Use the find command with the -mtime option to specify the number of days.
For example, to find files that are exactly 30 days old: find /path/to/directory -mtime 30
To find files that are older than 30 days: find /path/to/directory -mtime +30
To find files that are newer than 30 days: find /path/to/directory -mtime -30
Q200. How would you safeguard the data and services?
To safeguard data and services, I would implement encryption, access controls, regular backups, and monitoring.
Implement encryption for data at rest and in transit
Set up access controls to restrict unauthorized access
Regularly backup data to prevent data loss
Implement monitoring and alerting to detect and respond to security incidents
Top HR Questions asked in DMart
Interview Process at DMart
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month