Add office photos
Employer?
Claim Account for FREE

MasterCard

3.9
based on 719 Reviews
Video summary
Filter interviews by

100+ Amritsar Pharmaceutical Lab Interview Questions and Answers

Updated 13 Feb 2025
Popular Designations

Q1. Longest Palindromic Subsequence Problem Statement

Given a string A consisting of lowercase English letters, determine the length of the longest palindromic subsequence within A.

Explanation:

  • A subsequence is d...read more
Ans.

The task is to find the length of the longest palindromic subsequence in a given string.

  • Iterate through the string and create a 2D array to store the lengths of palindromic subsequences.

  • Use dynamic programming to fill the array based on the characters in the string.

  • Consider the cases where characters match or do not match to update the array values.

  • Return the length of the longest palindromic subsequence for each test case.

Add your answer

Q2. Word Pattern Problem Statement

Given two strings S and T, determine if S follows the same pattern as T.

A full match means there is a bijection between a letter of T and a non-empty word of S.

Example:

Input:
S...read more
Ans.

Check if two strings follow the same pattern based on bijection between letters and words.

  • Iterate through each letter in T and corresponding word in S to create a mapping.

  • Use a hashmap to store the mapping between letters and words.

  • Check if the mapping is consistent for all test cases.

Add your answer

Q3. Palindrome String Validation

Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.

Note:
The string 'S' should be evaluated in a case-insensi...read more
Ans.

The task is to check whether a given string is a palindrome or not, considering only alphabets and numbers and ignoring symbols and whitespaces.

  • Convert the string to lowercase and remove all symbols and whitespaces.

  • Reverse the modified string and compare it with the original string.

  • If they are equal, then the string is a palindrome.

  • If not, then the string is not a palindrome.

Add your answer

Q4. Maximum Subarray Sum Problem Statement

Given an array of integers, determine the maximum possible sum of any contiguous subarray within the array.

Example:

Input:
array = [34, -50, 42, 14, -5, 86]
Output:
137
E...read more
Ans.

The maximum sum of any contiguous subarray in an array is found using Kadane's algorithm in O(N) time.

  • Initialize two variables, maxSum and currentSum, both set to the first element of the array.

  • Iterate through the array from the second element.

  • For each element, update currentSum by adding the element to it.

  • If currentSum becomes negative, reset it to 0.

  • If currentSum is greater than maxSum, update maxSum.

  • After iterating through the array, maxSum will contain the maximum subarra...read more

Add your answer
Discover Amritsar Pharmaceutical Lab interview dos and don'ts from real experiences

Q5. Min Steps to One Using Dynamic Programming

Given a positive integer N, your task is to determine the minimum number of steps required to reduce N to 1.

Allowed Operations:

1) Subtract 1 from it: n = n - 1
2) If ...read more
Ans.

The task is to find the minimum number of steps required to reduce a positive integer to 1 using three given operations.

  • Use dynamic programming to solve the problem efficiently.

  • Create an array to store the minimum steps required for each number from 1 to N.

  • Iterate from 2 to N and calculate the minimum steps for each number based on the three operations.

  • Return the minimum steps for N.

Add your answer

Q6. Level Order Traversal Problem Statement

Given a binary tree of integers, return the level order traversal of the binary tree.

Input:

The first line contains an integer 'T', representing the number of test cases...read more
Ans.

Implement a function to return the level order traversal of a binary tree of integers.

  • Create a queue to store nodes for level order traversal

  • Start with the root node and enqueue it

  • While the queue is not empty, dequeue a node, print its value, and enqueue its children

  • Repeat until all nodes are traversed

Add your answer
Are these interview questions helpful?

Q7. Square Root (Integral) Problem Statement

Given a number N, calculate its square root and output the integer part only.

Example:

Input:
18
Output:
4
Explanation:

The square root of 18 is approximately 4.24. The ...read more

Ans.

The task is to find the integral part of the square root of a given number.

  • Use the built-in square root function to find the square root of the number.

  • Convert the result to an integer by rounding down or using the floor function.

  • Print the integer part of the square root as the output.

Add your answer

Q8. Next Greater Node in Linked List Problem Statement

In a set of linked ninja villages, the goal is to determine if a stronger ninja exists in the nearest village linked ahead. Given a linked list of 'N' integers...read more

Ans.

Given a linked list of ninja villages, find the next greater ninja strength in the nearest linked village.

  • Traverse the linked list and store the elements in an array.

  • Use a stack to keep track of elements with no next greater element found yet.

  • Iterate through the array to find the next greater element for each village.

  • Return the array of next greater elements for each village.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. If you are going to open an e-commerce website like Flipkart what will be the things that you will have to keep in mind.

Ans.

To open an e-commerce website like Flipkart, one must keep in mind various factors such as target audience, product range, user experience, logistics, and marketing.

  • Identify the target audience and their preferences

  • Offer a wide range of products to cater to different needs

  • Ensure a seamless user experience with easy navigation and quick loading time

  • Establish a robust logistics network for timely delivery and hassle-free returns

  • Invest in effective marketing strategies to reach ...read more

Add your answer

Q10. Java program to find sum and multplication of int inp ex: 123 return sum and addition

Ans.

Java program to find sum and multiplication of an integer input.

  • Use the modulus operator to extract each digit from the input integer.

  • Add the extracted digits to calculate the sum.

  • Multiply the extracted digits to calculate the multiplication.

View 1 answer

Q11. 3. How do you deal with senior customer when you don't have enough data?

Ans.

Communicate transparently and offer alternative solutions.

  • Explain the limitations of the available data and the potential risks of making decisions based on incomplete information.

  • Offer alternative solutions that can be implemented with the available data.

  • Collaborate with the customer to identify additional data sources or explore other options to gather more data.

  • Provide regular updates on the progress of data collection and analysis.

  • Ensure that all decisions are based on so...read more

Add your answer

Q12. Write java stream to find output JSON object is input contains State and filters ....> outout shoudl be resultant of both

Ans.

Java stream to filter JSON object by State and other filters

  • Use Java Stream API to filter JSON objects based on State and other filters

  • Create a Predicate to filter the JSON objects based on the given filters

  • Use the filter() method of Stream to apply the Predicate on the JSON objects

  • Collect the filtered JSON objects using the collect() method of Stream

Add your answer

Q13. Guesstimate the number of people travelling by local metro in mumbai

Ans.

The number of people travelling by local metro in Mumbai is estimated to be in millions.

  • Mumbai has a population of over 20 million people.

  • The local metro is a popular mode of transportation in Mumbai.

  • During peak hours, the metro trains are usually crowded.

  • The metro network in Mumbai is extensive, covering various parts of the city.

  • The number of daily commuters on the metro can be estimated based on population density and transportation preferences.

Add your answer

Q14. Reliance fresh wants to open a store in north-eastern part of India. Should it or should it not?

Ans.

Yes, Reliance Fresh should open a store in the north-eastern part of India.

  • The north-eastern part of India has a growing population and increasing consumer demand.

  • Reliance Fresh can tap into the untapped market potential in the region.

  • Opening a store in the north-eastern part of India can help Reliance Fresh expand its presence and increase its market share.

  • Reliance Fresh can leverage its existing supply chain and distribution network to efficiently serve customers in the reg...read more

Add your answer

Q15. 1. Brief your existing/last Project architecture ? 2. Design patterns used in microservice architecture ?(Since my last project was microservices) 3. What is saga pattern? 4. 2 Scenario based question - Data lo...

read more
Ans.

Answering questions related to microservice architecture, design patterns, Kafka cluster data loss prevention, and monitoring/recovery in Appdynamics.

  • My last project architecture was based on microservices, utilizing design patterns such as Circuit Breaker, Service Registry, and API Gateway.

  • Saga pattern is used in microservices to manage distributed transactions across multiple services.

  • In the event of data loss in a Kafka cluster, it is important to have proper replication a...read more

Add your answer

Q16. If I give you a coding problem to solve in the language you don’t know, can you solve it, when you’re allowed to refer Google search?

Ans.

Yes, I can solve a coding problem in a language I don't know with Google search.

  • Utilize Google search to understand syntax and concepts in the unfamiliar language

  • Break down the problem into smaller parts and search for solutions to each part

  • Refer to online resources, forums, and documentation for guidance

  • Practice writing and testing code snippets in the new language before attempting the full solution

Add your answer

Q17. 1. How to choose optimum probability threshold from ROC?

Ans.

To choose optimum probability threshold from ROC, we need to balance between sensitivity and specificity.

  • Choose the threshold that maximizes the sum of sensitivity and specificity

  • Use Youden's J statistic to find the optimal threshold

  • Consider the cost of false positives and false negatives

  • Use cross-validation to evaluate the performance of different thresholds

Add your answer

Q18. What if your application is down for 1 hour in one site in prod?

Ans.

I would investigate the root cause, work on fixing the issue, and implement measures to prevent it from happening again.

  • Investigate the root cause of the downtime, such as network issues, server failures, or software bugs

  • Work on fixing the issue promptly to minimize impact on users and business operations

  • Implement measures to prevent similar downtime in the future, such as redundancy, monitoring, and failover mechanisms

Add your answer

Q19. How do you make sure a throttling system process dropped messages from a slow downstream service?

Ans.

Implement a throttling system to handle dropped messages from a slow downstream service.

  • Implement a queue to store messages from the downstream service.

  • Set a maximum queue size and drop messages when the queue is full.

  • Use a timestamp to track when messages were received and process them in order.

  • Implement a retry mechanism to reprocess dropped messages after a certain time.

  • Monitor the queue size and processing speed to adjust throttling parameters as needed.

Add your answer

Q20. What are software development design patterns? Can you explain singleton design pattern and code an example to show that?

Ans.

Software development design patterns are reusable solutions to common problems encountered in software design.

  • Design patterns help in creating maintainable, scalable, and efficient software.

  • Singleton design pattern ensures a class has only one instance and provides a global point of access to it.

  • Example: Implementing a singleton class in Java -

  • public class Singleton { private static Singleton instance; private Singleton() {} public static Singleton getInstance() { if(instance...read more

Add your answer

Q21. How many feature you have added to your application by providing inputs through user stories as long as Agile frameworks is concerned?

Ans.

I have added 50 features through user stories in Agile framework.

  • I have been working on Agile framework for 2 years.

  • I have added features like user login, payment gateway integration, and search functionality.

  • I prioritize user stories based on business value and impact.

  • I collaborate with the development team to ensure the features are implemented correctly.

  • I continuously gather feedback from users to improve the application.

Add your answer

Q22. What kind of databases you’ve worked on? And explain what is DML!

Ans.

I have worked on relational databases like MySQL and PostgreSQL. DML stands for Data Manipulation Language.

  • Worked on MySQL and PostgreSQL databases

  • Familiar with writing SQL queries for data manipulation

  • DML stands for Data Manipulation Language

Add your answer

Q23. How you can parse location and shop name from a card transaction string?

Ans.

Use regex to extract location and shop name from transaction string.

  • Use regular expressions to match patterns for location and shop name.

  • Look for keywords like 'at', 'from', 'in' to identify location.

  • Consider variations in transaction strings and account for them in regex patterns.

  • Example: 'Spent $50 at Starbucks Coffee' -> Location: Starbucks Coffee, Shop Name: Starbucks Coffee

Add your answer

Q24. 2. How to test time series trend break up?

Ans.

To test time series trend break up, statistical tests like Augmented Dickey-Fuller test can be used.

  • Augmented Dickey-Fuller test can be used to check if a time series is stationary or not.

  • If the time series is not stationary, we can use differencing to make it stationary.

  • After differencing, we can again perform the Augmented Dickey-Fuller test to check for stationarity.

  • If there is a significant change in the mean or variance of the time series, we can use change point detecti...read more

Add your answer

Q25. Revenue collected by the barbers of Kanpur in an year

Ans.

I don't have the available data to answer this question.

  • Need data on number of barbers in Kanpur

  • Need data on average revenue per barber

  • Need data on number of working days in a year

  • Need data on number of customers per barber per day

Add your answer

Q26. What do you know about our Market Development Role?

Ans.

Market Development Role involves identifying and pursuing new business opportunities to expand the company's market share.

  • Market Development Role focuses on identifying new markets and customer segments

  • It involves conducting market research and analysis to understand customer needs and preferences

  • The role also involves developing marketing strategies and campaigns to target new customers

  • Examples of Market Development initiatives include launching new products, entering new ge...read more

Add your answer

Q27. The company wants to launch a premium credit card. How would you strategise to target the right customer segment? Complete thought process around the case was asked.

Ans.

To target the right customer segment for a premium credit card, I would analyze customer data, conduct market research, and create targeted marketing campaigns.

  • Conduct market research to identify potential customer segments who are likely to be interested in a premium credit card.

  • Analyze existing customer data to understand spending habits, income levels, and credit history to identify potential target segments.

  • Create targeted marketing campaigns that highlight the benefits a...read more

Add your answer

Q28. What is difference between Interface and abstract class?

Ans.

Interface is a contract that defines the methods a class must implement, while abstract class can have both abstract and concrete methods.

  • Interface cannot have any implementation, while abstract class can have both abstract and concrete methods.

  • A class can implement multiple interfaces but can only inherit from one abstract class.

  • Interfaces are used to achieve multiple inheritance in Java, while abstract classes are used to provide a common base for subclasses.

  • Interfaces are ...read more

Add your answer

Q29. Types of financial statements and how to analyse financial statements and furure projections.

Ans.

Financial statements include balance sheet, income statement, and cash flow statement. Analysis involves ratio analysis and trend analysis.

  • Balance sheet shows assets, liabilities, and equity at a specific point in time

  • Income statement shows revenue, expenses, and profit/loss over a period of time

  • Cash flow statement shows cash inflows and outflows over a period of time

  • Ratio analysis involves comparing financial ratios to industry benchmarks or historical data

  • Trend analysis inv...read more

Add your answer

Q30. What are the usecases where CQRS pattern can be used ?

Ans.

CQRS pattern can be used in scenarios where read and write operations need to be separated for better scalability and performance.

  • CQRS can be used in applications with complex domain models that require different models for reading and writing data.

  • It can be beneficial in scenarios where read operations heavily outnumber write operations.

  • CQRS is useful when there is a need to optimize read and write operations independently.

  • Examples include e-commerce platforms for handling p...read more

Add your answer

Q31. How will you resolve eventual consistency in a relational DB from design perspective ?

Ans.

Implementing eventual consistency in a relational DB involves careful design and use of techniques like conflict resolution and versioning.

  • Use timestamp-based conflict resolution to handle conflicting updates.

  • Implement versioning to track changes and resolve conflicts.

  • Consider using distributed transactions or distributed consensus algorithms like Paxos or Raft.

  • Use compensating transactions to rollback changes in case of conflicts.

  • Implement retry mechanisms to handle temporar...read more

Add your answer

Q32. There are 25 horses among which you need to find fastest 3. You don't have a timer and a race can be among maximum 5 horses. Find minimum number of races required.

Ans.

Minimum 7 races are required to find the fastest 3 horses.

  • Divide the 25 horses into 5 groups of 5 horses each.

  • Conduct a race among each group, identifying the fastest horse in each race.

  • Take the top 3 horses from each race and conduct a final race among them.

  • The top 3 horses in the final race will be the fastest 3 horses overall.

Add your answer

Q33. How to pass input field values from form to db. How to make code testable/loosely coupled.

Ans.

Pass input field values from form to db by using a data access layer and dependency injection for testability.

  • Create a data access layer to handle interactions with the database.

  • Use parameterized queries to prevent SQL injection.

  • Implement dependency injection to decouple the code and make it testable.

  • Mock the data access layer in unit tests to isolate database interactions.

  • Use interfaces to define contracts between components for easier testing.

Add your answer

Q34. If the 3rd position in a string contains 'b' replace it with 'v'

Ans.

Replace 'b' with 'v' in the 3rd position of each string in an array

  • Iterate through each string in the array

  • Check if the 3rd position contains 'b'

  • If yes, replace 'b' with 'v'

Add your answer

Q35. Any example where you introduced a change in the process?

Ans.

Yes

  • Introduced a change in the development process to implement continuous integration

  • Implemented a new code review process to improve code quality

  • Introduced automated testing to catch bugs early in the development cycle

Add your answer

Q36. What are the ways to secure REST API?

Ans.

Securing REST API involves using authentication, authorization, encryption, and input validation.

  • Use authentication methods like OAuth, JWT, or API keys to verify the identity of clients.

  • Implement authorization to control access to resources based on user roles and permissions.

  • Encrypt data transmission using HTTPS to protect sensitive information from being intercepted.

  • Validate and sanitize input data to prevent injection attacks like SQL injection or XSS.

Add your answer

Q37. What are risks? Can you elaborate different types of risks?

Ans.

Risks are potential events that can cause harm or loss. There are various types of risks.

  • Financial risk - loss of money or assets

  • Operational risk - failure of processes, systems or people

  • Reputational risk - damage to brand or image

  • Legal risk - violation of laws or regulations

  • Strategic risk - failure to meet business objectives

  • Physical risk - harm to people or property

  • Cybersecurity risk - data breaches or cyber attacks

Add your answer

Q38. How to maintain security in Microservices ?

Ans.

Maintaining security in Microservices involves implementing authentication, authorization, encryption, and monitoring.

  • Implement authentication and authorization mechanisms to control access to microservices.

  • Use encryption to secure communication between microservices.

  • Implement monitoring and logging to detect and respond to security incidents.

  • Regularly update dependencies and patches to address security vulnerabilities.

  • Implement rate limiting and throttling to prevent abuse a...read more

Add your answer

Q39. LLM usecase and explain how to work on it

Ans.

LLM usecase involves using Latent Linear Models for various data analysis tasks.

  • LLM can be used for dimensionality reduction in high-dimensional data.

  • LLM can be used for clustering similar data points together.

  • LLM can be used for anomaly detection in datasets.

  • LLM can be applied in natural language processing tasks such as text classification.

  • LLM can be used in recommendation systems to predict user preferences.

Add your answer

Q40. Customerz who have done transaction in more than 10 consecutive days

Ans.

To identify customers who have made transactions on more than 10 consecutive days.

  • Identify customers who have made transactions every day for at least 10 days in a row.

  • Check transaction history for each customer to determine consecutive days of transactions.

  • Create a list of customers who meet the criteria.

  • Consider using SQL queries or data visualization tools to analyze the data.

  • Example: Customer A made transactions on days 1-10 consecutively, while Customer B only made trans...read more

Add your answer

Q41. What are the types of deployments?

Ans.

Types of deployments include blue-green, canary, rolling, and immutable.

  • Blue-green deployment involves running two identical production environments and switching between them.

  • Canary deployment gradually rolls out changes to a small subset of users before deploying to the entire infrastructure.

  • Rolling deployment updates a few instances at a time, ensuring continuous availability.

  • Immutable deployment creates new instances for each update, avoiding in-place updates.

Add your answer

Q42. What is Blue Green Deployment ?

Ans.

Blue Green Deployment is a software release strategy that reduces downtime and risk by running two identical production environments.

  • In Blue Green Deployment, one environment (blue) is live and serving production traffic while the other (green) is idle and ready to be switched to at any time.

  • This strategy allows for zero downtime deployments, as the switch between blue and green environments can be done seamlessly.

  • Blue Green Deployment also helps in quickly rolling back to th...read more

Add your answer

Q43. How will you go about optimising a query?

Ans.

Optimising a query involves identifying bottlenecks and improving efficiency.

  • Identify slow-performing queries using tools like query execution plans.

  • Optimize database indexes to speed up query performance.

  • Limit the number of columns and rows returned in the query.

  • Avoid using SELECT * and instead specify only the necessary columns.

  • Use appropriate data types and avoid unnecessary data conversions.

  • Consider denormalizing data for frequently accessed queries.

  • Use query hints or opt...read more

Add your answer

Q44. Find sub sudoko in given multi dimensional int. array

Ans.

Finding sub sudoko in a multi-dimensional integer array.

  • Iterate through each row and column to find sub-sudoku

  • Check if each sub-grid contains all numbers from 1 to 9

  • If yes, then it is a sub-sudoku

  • If no, then move to the next sub-grid

Add your answer

Q45. Parent child component communication in react?

Ans.

Parent child component communication in React involves passing data from parent to child components and triggering events from child to parent components.

  • Use props to pass data from parent to child components

  • Use callback functions to trigger events from child to parent components

  • Context API can be used for passing data to deeply nested components

Add your answer

Q46. Can abstract class instantiated?

Ans.

No, abstract classes cannot be instantiated.

  • Abstract classes are meant to be inherited and extended by other classes.

  • Attempting to instantiate an abstract class will result in a compilation error.

  • Abstract classes can have abstract methods that must be implemented by the subclass.

Add your answer

Q47. How to optimize react application?

Ans.

Optimizing a React application involves code splitting, lazy loading, minimizing bundle size, using memoization, and optimizing render performance.

  • Implement code splitting to load only necessary code for each route or component.

  • Utilize lazy loading to defer loading of non-essential components until they are needed.

  • Minimize bundle size by removing unused code, optimizing images, and using tree shaking.

  • Use memoization techniques like useMemo and useCallback to avoid unnecessary...read more

Add your answer

Q48. What is useRef, useMemo, useCallback?

Ans.

useRef is used to persist a value across renders, useMemo is used to memoize expensive calculations, useCallback is used to memoize functions.

  • useRef is commonly used to access DOM elements or persist values between renders.

  • useMemo is used to memoize expensive calculations to avoid re-computation.

  • useCallback is used to memoize functions to prevent unnecessary re-renders.

  • Example: useRef can be used to store a reference to an input element in a form.

  • Example: useMemo can be used ...read more

Add your answer

Q49. How will you create a new wallet from scratch today?

Ans.

To create a new wallet from scratch, I would start by researching the latest technologies and security measures, then design a user-friendly interface, develop the backend infrastructure, and conduct thorough testing before launching.

  • Research the latest technologies and security measures for wallet development

  • Design a user-friendly interface for easy navigation and accessibility

  • Develop the backend infrastructure to securely store and manage user data

  • Conduct thorough testing t...read more

Add your answer

Q50. Routing how to use proxy

Ans.

Routing through a proxy involves configuring the proxy server to forward requests to the destination server.

  • Configure the proxy server to listen for incoming requests

  • Configure the proxy server to forward requests to the destination server

  • Configure the client to use the proxy server for outgoing requests

  • Use a proxy server to bypass network restrictions or improve performance

  • Examples: Nginx, Apache, Squid

Add your answer

Q51. What is the difference between web service and REST API?

Ans.

Web service is a generic term for any service available over the internet, while REST API is a specific type of web service that follows REST architectural principles.

  • Web service is a broad term that encompasses any service available over the internet, including SOAP, REST, and others.

  • REST API is a specific type of web service that follows the principles of Representational State Transfer (REST).

  • REST APIs use standard HTTP methods like GET, POST, PUT, DELETE to perform CRUD o...read more

Add your answer

Q52. What is app.use in .net core?

Ans.

app.use in .NET Core is used to add middleware to the request pipeline.

  • app.use is a method used in ASP.NET Core to add middleware components to the request pipeline.

  • Middleware components are software components that are executed in the request pipeline to handle requests and responses.

  • Middleware components can perform tasks such as authentication, logging, error handling, and more.

  • Example: app.use(new MiddlewareComponent());

Add your answer

Q53. What are SSL certificates?

Ans.

SSL certificates are digital certificates that authenticate the identity of a website and encrypt information sent to the server.

  • SSL certificates ensure secure communication between a user's browser and a website's server.

  • They use encryption to protect sensitive data such as login credentials, credit card information, etc.

  • SSL certificates are issued by Certificate Authorities (CAs) and contain information about the website's owner and the CA's digital signature.

  • Examples of SS...read more

Add your answer

Q54. Explain spring security,oauth2 ,jwt,saml and tls level security

Ans.

Spring Security is a framework that provides authentication, authorization, and other security features for Java applications.

  • OAuth2 is an authorization framework that allows third-party applications to access a user's resources without sharing their credentials.

  • JWT (JSON Web Token) is a compact, URL-safe means of representing claims to be transferred between two parties.

  • SAML (Security Assertion Markup Language) is an XML-based standard for exchanging authentication and autho...read more

Add your answer

Q55. Detailed flow from FE to BE to db.

Ans.

The flow of data from the front end to the back end to the database.

  • Front end sends a request to the back end server.

  • Back end processes the request and interacts with the database.

  • Database retrieves or updates the data and sends it back to the back end.

  • Back end sends the response to the front end for display.

Add your answer

Q56. Implement lag() and lead() without using lag() or lead()

Ans.

Implement lag() and lead() functions without using lag() or lead()

  • To implement lag(), shift the values in the array by one position to the right

  • To implement lead(), shift the values in the array by one position to the left

  • For example, to implement lag() on [1, 2, 3, 4], you can shift the values to get [null, 1, 2, 3]

  • For lead(), you can shift the values to get [2, 3, 4, null]

Add your answer

Q57. Bagging boosting and its difference and uses.

Ans.

Bagging and boosting are ensemble learning techniques used to improve the performance of machine learning models by combining multiple weak learners.

  • Bagging (Bootstrap Aggregating) involves training multiple models independently on different subsets of the training data and combining their predictions through averaging or voting.

  • Boosting involves training multiple models sequentially, where each subsequent model corrects the errors made by the previous ones, leading to a stro...read more

Add your answer

Q58. Methods to minimize overfitting and underfitting

Ans.

To minimize overfitting, use techniques like cross-validation, regularization, early stopping. To minimize underfitting, increase model complexity, gather more data.

  • Use cross-validation to evaluate model performance on different subsets of data

  • Apply regularization techniques like L1 or L2 regularization to penalize large coefficients

  • Implement early stopping to prevent the model from training for too long

  • Increase model complexity by adding more features or using a more complex...read more

Add your answer

Q59. What do you know about financial inclusion?

Ans.

Financial inclusion refers to the availability and accessibility of financial services to all individuals and businesses, regardless of their income level or location.

  • Financial inclusion aims to promote economic growth and reduce poverty by providing access to financial services such as banking, insurance, and credit.

  • It is particularly important for individuals and businesses in developing countries, rural areas, and low-income communities who may not have access to tradition...read more

Add your answer

Q60. Java code to find numbe of repeated characters in String

Ans.

Java code to find number of repeated characters in a String.

  • Create a HashMap to store characters and their counts.

  • Iterate through the String and update the counts in the HashMap.

  • Count the characters with counts greater than 1 to find repeated characters.

Add your answer

Q61. SQL code to fetch second highest salary

Ans.

SQL query to fetch second highest salary

  • Use ORDER BY and LIMIT to get the second highest salary

  • SELECT DISTINCT to avoid duplicates

  • Use subquery to avoid hardcoding the salary value

Add your answer

Q62. Delete rows from table that are 6 months old from current date

Ans.

Use SQL query with WHERE clause to delete rows older than 6 months from current date

  • Use CURRENT_DATE() function to get current date

  • Use DATE_SUB() function to subtract 6 months from current date

  • Write a DELETE query with WHERE clause to delete rows older than calculated date

Add your answer

Q63. What is dependency injection?

Ans.

Dependency injection is a design pattern in which components are given their dependencies rather than creating them internally.

  • Dependency injection helps in achieving loose coupling between classes.

  • It allows for easier testing by mocking dependencies.

  • There are three types of dependency injection: constructor injection, setter injection, and interface injection.

  • Example: Instead of a class creating an instance of another class it needs, the instance is provided to it through co...read more

Add your answer

Q64. Do you think data analysis job is overrated?

Ans.

No, data analysis job is not overrated as it plays a crucial role in decision-making and problem-solving.

  • Data analysis helps in identifying trends and patterns in data

  • It provides valuable insights for businesses to make informed decisions

  • Data analysis is essential for optimizing processes and improving efficiency

  • It can uncover hidden opportunities and potential risks

  • Many industries rely on data analysis for strategic planning and forecasting

Add your answer

Q65. what are the different types of commands in sql

Ans.

Different types of commands in SQL include Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL).

  • DDL commands are used to define the structure of database objects such as CREATE, ALTER, DROP.

  • DML commands are used to manipulate data in the database such as SELECT, INSERT, UPDATE, DELETE.

  • DCL commands are used to control access to data in the database such as GRANT, REVOKE.

  • TCL commands are used to ma...read more

Add your answer

Q66. Guess the numbers of laptops sold in india every year

Ans.

It is estimated that around 10-12 million laptops are sold in India every year.

  • Approximately 10-12 million laptops are sold in India annually.

  • Sales numbers may vary based on market trends and economic factors.

  • Brands like HP, Dell, Lenovo, and Asus are popular choices among consumers in India.

Add your answer

Q67. Do you have knowledge about KPIs

Ans.

Yes, KPIs are key performance indicators used to measure the success of a product or project.

  • KPIs are specific metrics used to evaluate the performance of a product or project.

  • They help track progress towards goals and objectives.

  • Examples of KPIs include conversion rates, customer satisfaction scores, and revenue growth.

  • KPIs should be aligned with the overall business strategy and objectives.

Add your answer

Q68. how does a typical Agile product work

Ans.

Agile product development involves iterative and incremental development cycles to quickly deliver value to customers.

  • Cross-functional teams work in short iterations called sprints

  • Prioritize features based on customer feedback and business value

  • Regularly review and adapt to changes in requirements

  • Deliver working software frequently, typically every 2-4 weeks

Add your answer

Q69. How vector databases work?

Ans.

Vector databases store data in a vector format, allowing for efficient querying and analysis of high-dimensional data.

  • Vector databases use vectors to represent data points in a multi-dimensional space.

  • They are commonly used in machine learning and data science applications for tasks like similarity search and clustering.

  • Examples of vector databases include Faiss, Annoy, and Milvus.

Add your answer

Q70. Company fit and expectations of Compensation etc.

Ans.

Company fit is crucial for long-term success. Compensation expectations should align with industry standards and experience.

  • Research the company culture and values to ensure alignment with personal values and work style.

  • Understand the company's expectations for the role and how your skills and experience can meet or exceed them.

  • Discuss compensation openly and transparently, considering industry standards, your experience level, and the value you bring to the company.

  • Negotiate...read more

Add your answer

Q71. Difference between Kafka and RabbitMQ ?

Ans.

Kafka is a distributed streaming platform while RabbitMQ is a message broker.

  • Kafka is designed for high-throughput, fault-tolerant, real-time data streaming.

  • RabbitMQ is a traditional message broker that follows the AMQP protocol.

  • Kafka uses a publish-subscribe model while RabbitMQ uses a message queuing model.

  • Kafka is horizontally scalable and provides strong durability guarantees.

  • RabbitMQ supports multiple messaging protocols and has more advanced routing capabilities.

Add your answer

Q72. Difference between Ada boosting and gradient boosting?

Ans.

AdaBoosting and Gradient Boosting are both boosting algorithms, but differ in their approach to assigning weights to misclassified data points.

  • AdaBoosting assigns higher weights to misclassified data points in each iteration, while Gradient Boosting adjusts the weights based on the gradient of the loss function.

  • AdaBoosting is more prone to overfitting, while Gradient Boosting is more robust and can handle noisy data.

  • AdaBoosting is less computationally expensive than Gradient ...read more

Add your answer

Q73. Processing semi structured data

Ans.

Processing semi structured data involves extracting and organizing information from data that does not fit neatly into a traditional database structure.

  • Use tools like Apache Spark or Hadoop for processing semi structured data

  • Utilize techniques like data parsing, data cleaning, and data transformation

  • Consider using NoSQL databases like MongoDB for storing semi structured data

  • Examples include processing JSON, XML, or log files

Add your answer

Q74. Create a list of decreasing integers along with date

Ans.

List of decreasing integers with dates

  • Create an array of strings with decreasing integers and corresponding dates

  • Start with the highest integer and oldest date, and decrease the integer with each subsequent date

  • Example: ['10 - 2022-01-01', '9 - 2022-01-02', '8 - 2022-01-03', ...]

Add your answer

Q75. Tell me what you know about MasterCards.

Ans.

MasterCards are a type of payment card that can be used to make purchases at various merchants worldwide.

  • MasterCards are issued by financial institutions and can be used to make purchases at millions of merchants worldwide.

  • They offer various benefits such as cashback rewards, travel insurance, and fraud protection.

  • MasterCards come in different types such as credit cards, debit cards, and prepaid cards.

  • Examples of MasterCards include the Mastercard World Elite, Mastercard Blac...read more

Add your answer

Q76. Loss functions used in classification algorithms?

Ans.

Loss functions are used to measure the error between predicted and actual values in classification algorithms.

  • Common loss functions include cross-entropy, hinge loss, and squared hinge loss.

  • Cross-entropy is commonly used in logistic regression and neural networks.

  • Hinge loss is used in support vector machines.

  • Squared hinge loss is a variant of hinge loss that penalizes outliers more heavily.

  • The choice of loss function depends on the specific problem and the desired trade-off b...read more

Add your answer

Q77. How do you delete duplicate values

Ans.

To delete duplicate values, use SQL queries with DISTINCT keyword or programming languages like Python with sets.

  • In SQL, use SELECT DISTINCT to retrieve unique values

  • In Python, convert list to set to automatically remove duplicates

  • Use pandas library in Python to drop duplicates in a DataFrame

Add your answer

Q78. What is partitioning

Ans.

Partitioning is the process of dividing a large dataset into smaller, more manageable parts.

  • Partitioning helps in parallel processing of data

  • It improves query performance by reducing the amount of data that needs to be scanned

  • Partitioning can be done based on various criteria like range, hash, list, etc.

  • Examples of partitioning include sharding in MongoDB and partitioning in Hadoop Distributed File System (HDFS)

Add your answer

Q79. How would you copy a large dataset

Ans.

Use a data migration tool to copy the dataset efficiently.

  • Utilize a data migration tool like AWS Data Pipeline, Apache Nifi, or Talend to copy the dataset.

  • Break down the dataset into smaller chunks to avoid overwhelming the system.

  • Ensure proper data validation and error handling during the copying process.

  • Consider using parallel processing to speed up the copying process.

  • Monitor the progress of the dataset copying to track any issues or bottlenecks.

Add your answer

Q80. How would ONDC impact Amazon?

Ans.

ONDC would impact Amazon by increasing competition and potentially leading to lower prices for consumers.

  • ONDC would introduce more competition in the online retail space, forcing Amazon to innovate and improve its services to stay ahead.

  • Amazon may need to lower prices or offer better deals to compete with other online retailers on the ONDC platform.

  • ONDC could also provide Amazon with opportunities to reach new customers and expand its market share.

  • Amazon may need to adjust it...read more

Add your answer

Q81. Cross border analysis of statements.

Ans.

Cross border analysis of statements involves examining financial statements of companies operating in different countries.

  • It helps identify potential risks and opportunities for investment

  • It involves analyzing financial statements of companies operating in different countries

  • Factors such as currency exchange rates, political stability, and regulatory environment are taken into consideration

  • Example: Analyzing the financial statements of a multinational corporation with operati...read more

Add your answer

Q82. Describe the web application architecture.

Ans.

Web application architecture refers to the structure and layout of components in a web application.

  • Web application architecture typically consists of client-side and server-side components.

  • Client-side components include the user interface and any client-side scripts.

  • Server-side components include the server, application logic, and database.

  • Common architectures include MVC (Model-View-Controller) and microservices.

  • Examples of web application architectures include single-page a...read more

Add your answer

Q83. How do you mitigate risks?

Ans.

I mitigate risks by identifying potential risks, analyzing their impact, and implementing measures to prevent or minimize them.

  • Identify potential risks

  • Analyze the impact of each risk

  • Implement measures to prevent or minimize risks

  • Regularly review and update risk management plan

  • Communicate risks and mitigation strategies to stakeholders

Add your answer

Q84. Why microservices why not monolithic.

Ans.

Microservices offer scalability, flexibility, and resilience compared to monolithic architecture.

  • Microservices allow for independent development and deployment of services.

  • Scalability is easier with microservices as individual components can be scaled independently.

  • Microservices promote fault isolation, preventing a single service failure from bringing down the entire system.

  • Flexibility is increased as different technologies can be used for different services.

  • Microservices en...read more

Add your answer

Q85. what is problem management

Ans.

Problem management is the process of identifying, analyzing, and resolving recurring issues to minimize their impact on the system.

  • Problem management aims to prevent incidents from occurring by addressing their root causes.

  • It involves documenting and tracking problems, analyzing their patterns, and implementing corrective actions.

  • Examples of problem management activities include trend analysis, root cause analysis, and implementing preventive measures.

  • It helps improve system ...read more

Add your answer

Q86. Design Calendar System

Ans.

Design a calendar system for scheduling events and managing time.

  • Include features like creating events, setting reminders, and viewing schedules.

  • Allow users to set recurring events and customize event details.

  • Implement a user-friendly interface for easy navigation and interaction.

  • Integrate with other applications for seamless data sharing.

  • Consider scalability and performance for handling large amounts of data.

Add your answer

Q87. Explain Spring MVC structure

Ans.

Spring MVC is a framework for building web applications in Java.

  • Model: Represents the data of the application

  • View: Represents the UI of the application

  • Controller: Handles the user input and updates the model and view accordingly

  • DispatcherServlet: Front controller that receives all incoming requests and routes them to the appropriate handler

  • RequestMapping: Annotation used to map web requests to specific handler methods

Add your answer

Q88. Different ways of CRM?

Ans.

Different ways of CRM include operational, analytical, and collaborative CRM.

  • Operational CRM focuses on automating and improving customer-facing processes such as sales, marketing, and customer service.

  • Analytical CRM uses data analysis to gain insights into customer behavior and preferences, allowing for more targeted marketing and personalized experiences.

  • Collaborative CRM involves integrating customer data across different departments and channels to provide a seamless and ...read more

Add your answer

Q89. Explain java8 concepts

Ans.

Java8 introduced new features like lambda expressions, streams, functional interfaces, and default methods.

  • Lambda expressions allow you to write more concise code by providing a way to pass functions as arguments.

  • Streams provide a way to work with sequences of elements and perform operations like filter, map, reduce, etc.

  • Functional interfaces are interfaces with a single abstract method, which can be implemented using lambda expressions.

  • Default methods allow interfaces to hav...read more

Add your answer

Q90. Internal working of hashmap

Ans.

HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.

  • HashMap uses an array of buckets to store key-value pairs.

  • Keys are hashed to determine the index where the value will be stored.

  • In case of hash collisions, a linked list or a balanced tree is used to store multiple values at the same index.

  • HashMap allows null keys and values.

  • Example: HashMap<String, Integer> map = new HashMap<>(); map.put("key1", 1);

Add your answer

Q91. Current project

Ans.

Currently working on developing a web application for a healthcare company.

  • Utilizing React.js for front-end development

  • Implementing RESTful APIs using Node.js and Express

  • Working with a PostgreSQL database for data storage

Add your answer

Q92. Describe design patterns in Microservice

Ans.

Design patterns in Microservices are reusable solutions to common problems encountered in designing and implementing microservices architecture.

  • Design patterns help in structuring microservices for scalability, resilience, and maintainability.

  • Some common design patterns in microservices include Service Registry, Circuit Breaker, API Gateway, and Event Sourcing.

  • Service Registry pattern involves a central registry that allows services to discover and communicate with each other...read more

Add your answer

Q93. difference between union and union all

Ans.

Union combines and removes duplicates, Union All combines without removing duplicates.

  • Union combines result sets and removes duplicates

  • Union All combines result sets without removing duplicates

  • Union is slower than Union All as it involves removing duplicates

  • Union All is faster than Union as it does not remove duplicates

Add your answer

Q94. What is collection framework

Ans.

Collection framework is a unified architecture for representing and manipulating collections of objects in Java.

  • It provides interfaces (List, Set, Map) and classes (ArrayList, HashSet, HashMap) to store and manipulate groups of objects.

  • Collections framework simplifies the process of storing, retrieving, and manipulating data in Java programs.

  • It allows developers to work with collections of objects in a consistent and efficient manner.

  • Example: ArrayList is a class that impleme...read more

Add your answer

Q95. what is data driven testing

Ans.

Data driven testing is a testing approach where test cases are created based on data from external sources.

  • Test cases are designed based on input data and expected output data

  • Allows for testing multiple scenarios with different data sets

  • Reduces the need for manual intervention in test case creation and execution

Add your answer

Q96. Financial analysis methods

Ans.

Financial analysis methods include ratio analysis, trend analysis, and cash flow analysis.

  • Ratio analysis involves comparing financial ratios to industry benchmarks or historical data.

  • Trend analysis looks at changes in financial data over time to identify patterns and potential future outcomes.

  • Cash flow analysis examines the inflows and outflows of cash to determine a company's liquidity and ability to meet financial obligations.

Add your answer

Q97. Micro service design patterns

Ans.

Micro service design patterns are architectural patterns used to design and implement microservices.

  • Service discovery

  • Circuit breaker

  • API gateway

  • Event sourcing

  • Saga pattern

Add your answer

Q98. architecture of current project

Ans.

The architecture of the current project follows a microservices design pattern with separate services for different functionalities.

  • Utilizes RESTful APIs for communication between services

  • Uses Docker containers for deployment and scalability

  • Implements service discovery and load balancing with tools like Eureka or Consul

Add your answer

Q99. What is money laundering

Ans.

Money laundering is the illegal process of making large amounts of money generated by a criminal activity, such as drug trafficking or terrorist funding, appear to have come from a legitimate source.

  • Money laundering involves disguising the origins of illegally obtained money by passing it through a complex sequence of banking transfers or commercial transactions.

  • It is often done to make the money appear as if it was earned legally and to avoid detection by authorities.

  • Money l...read more

Add your answer

Q100. Use of oops in some cases

Ans.

Object-oriented programming (OOP) is useful for creating reusable code, organizing complex systems, and modeling real-world entities.

  • Encapsulation: OOP allows for bundling data and methods into objects, providing data security and reducing complexity.

  • Inheritance: OOP enables the creation of new classes based on existing ones, promoting code reuse and reducing redundancy.

  • Polymorphism: OOP allows objects to be treated as instances of their parent class, facilitating flexibility...read more

Add your answer
1
2
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Amritsar Pharmaceutical Lab

based on 119 interviews
Interview experience
3.7
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.1
 • 2.2k Interview Questions
3.5
 • 2.1k Interview Questions
4.1
 • 365 Interview Questions
3.8
 • 333 Interview Questions
3.6
 • 178 Interview Questions
4.6
 • 159 Interview Questions
View all
Top MasterCard Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter