Publicis Sapient
Sapthagiri Medical Agencies Interview Questions and Answers
Q1. An unsorted array has numbers. Find the duplicate numbers and return the array.
Find duplicate numbers in an unsorted array and return the array.
Iterate through the array and keep track of seen numbers using a hash table.
If a number is already in the hash table, it is a duplicate.
Add the duplicate number to a new array and return it.
Q2. Create a Login form and validate email input using Vanilla JS.
Create a Login form with email validation using Vanilla JS.
Create a form in HTML with input fields for email and password
Use JavaScript to validate the email input using regular expressions
Display error messages if the email input is not in the correct format
Q3. 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
Q4. 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
Q5. Deep copy vs Shallow copy.
Deep copy creates a new object with its own memory, while shallow copy creates a new reference to the same memory.
Deep copy duplicates the object and all of its contents, while shallow copy only duplicates the object itself.
Deep copy is more memory-intensive than shallow copy.
In Python, deep copy can be achieved using the copy.deepcopy() method, while shallow copy can be achieved using the copy.copy() method.
Q6. Design a product catalogue to view and book order and update the stock
A product catalogue system for viewing, booking orders, and updating stock
Create a database to store product information, stock levels, and orders
Design a user-friendly interface for browsing products and placing orders
Implement functionality for updating stock levels after orders are placed
Include features for tracking order status and managing inventory
Consider implementing search and filter options for easy navigation
Q7. Simple task to fetch characters and their movies
Fetch characters and their movies
Use API like IMDb or The Movie Database to fetch movie data
Parse the data to extract characters and their associated movies
Store the characters and movies in an array of strings
Q8. writing a recursion program
Recursion program is a function that calls itself until a base condition is met.
Identify the base case and write the code to handle it
Write the code to call the function recursively
Ensure that the recursion terminates eventually
Examples: factorial, Fibonacci sequence, binary search
Q9. Hands on custom hooks
Custom hooks are reusable functions that allow you to extract component logic into separate functions for better reusability and readability.
Custom hooks are created by prefixing the function name with 'use' (e.g. useCustomHook)
They can be used to share logic between components without repeating code
Custom hooks can be used for data fetching, state management, and more
Interview Process at Sapthagiri Medical Agencies
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month