Paytm
100+ Cavinkare Interview Questions and Answers
You have been given an integer K.
Your task is to generate all binary strings of length K such that there are no consecutive 1s in the string. This means that the binary st...read more
You are given an unsorted array/list 'ARR' of 'N' integers. Your task is to return the length of the longest consecutive sequence.
The consecutive sequence is in the form ['NUM', 'NU...read more
Implement a SpecialStack Data Structure that supports getMin() in O(1) time and O(1) extra space along with push(), pop(), top(), isEmpty(...read more
You have been given two strings ‘STR1’ and ‘STR2’.
Your task is to find if ‘STR1’ is a subsequence of ‘STR2’.
A subsequence of a string is a new string that can be derived from the original string...read more
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
You are given an array of integers 'ARR' of size 'N' and another integer 'K'. Your task is to find and return 'K'th smallest value present in the array.
Note: All the elements in the array a...read more
A permutation is a mathematical technique that determines the number of possible arrangements in a set when the order of the arrangements matters. A string of length 'N' has 'N'! permutations.
Given...read more
Given a string (STR) of length N, you have to create a new string by performing the following operation:
Take the smallest character from the first 'K' characters of STR, remove it from STR...read more
You are given an array containing ‘N’ integers. You need to find the number of subsequences of length 3 which are in Geometric progression with common ratio ‘R’.
A geometric progression (G...read more
Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.
If there are an odd number of elements, return the middle element if there are eve...read more
You are given an array containing N non-negative integers. Your task is to partition this array into two subsets such that th...read more
Given a binary tree, a target node in the binary tree, and an integer ‘K’. You need to find all the nodes that are at a distance ‘K’ from the given target nod...read more
You have been given an unsorted array ‘ARR’.
Your task is to sort the array in such a way that the array looks like a wave array.
Example:
If the given sequence ‘ARR’ has ‘N’ elements ...read more
You are given the head node of a singly linked list ‘head’. Your task is to modify the linked list in such a way that all the even valued nodes appear before the all...read more
You have been given a square array 'VEC' of integers of size 'N' rows and 'N' columns. Your task is to find the minimum sum of a falling path through the square array. The number of rows...read more
You have been given an array/list of strings 'inputStr'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another....read more
Ninja has its own technique of making a decision to do something or not. This technique is known as the ninja technique. In this technique, Ninja generates a random string containing only digits,...read more
Given an array arr of N integers that may contain duplicate integers. The task is to return the count of subsets of the given array such that each subset contains only distinct element...read more
You are given a Singly Linked List of integers. You need to reverse the Linked List by changing the links between nodes.
Input Format :
The first line of input contains a single integer T, ...read more
You are given the ‘ROOT’ of a binary tree with ‘N’ nodes where each node in the tree has some coins, and there are ‘N’ coins total. In one move, we may choose two adjacent nodes and move one c...read more
Given a matrix where every element is either 1 or 0(zero), replace 0 with 1 if surrounded by 1. A 0 (or a set of 0s) is considered to be surrounded by 1 if there are 1 at locations just below, just ab...read more
We were given a number system where 0 was mapped to 9, 1 to 8, 2 to 7, 3 to 6 and so on.We were given an positive integer as an input and we had to convert it into an integer in the new number sys...read more
A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight ...read more
You are given a stream of 'N' integers. For every 'i-th' integer added to the running list of integers, print the resulting median.
Print only the integer part of the median.
Input Format :
The fi...read more
How would you manage an Employee-Organisation scenario as a Database? Explain your schema and relations between them.
Three questions were asked: -
1. What is Virtual Memory?
2. What is Belady's Anomaly?
3. What is page fault?
Assuming the best cricketer playing with the best strategy. How many maximum runs he can score in ipl satisfying all rules of cricket and NO wide balls.
What are the conditions for a deadlock to occur?
What do you know about Paging and Segmentation? Discuss their needs and work.
Given a singly linked list of integers. Your task is to return the head of the reversed linked list.
For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
How your project handles web requests? Explain from the scratch.
What is virtual memory .
What are page faults.
What is kernel
What is segementation.
Difference between internal and external fragmetation
Find nth maximum salary from employee table. Schema of the table is: -
(employee_id,employee_name,employee_salary)
Given an array of numbers, find the maximum sum of any contiguous subarray of the array.
For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would ...read more
SQL command
ACID properties
Difference between unique primary and foreign key.
You are given an array of integers. You need to sort the array in ascending order using quick sort.
Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the arr...read more
A palindrome string is one that reads the same backward as well as forward. Given a string 'STR', you need to tell the minimum number of characters needed to insert...read more
You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to print the zigzag traversal of the given tree.
Note:
In zigzag order, level 1 is printed from...read more
There is a one-dimensional garden of length 'N'. On each of the positions from 0 to 'N', there is a fountain, and this fountain’s water can reach up to a certain range as explained further. In ...read more
Design a stack that supports getMin() in O(1) time and O(1) extra space
You have been given an arbitrary binary tree and a node of this tree. You need to find the inorder successor of this node in the tree.
The inorder successor of a node in a binary tree is that no...read more
Given a ‘N’ * ’M’ maze with obstacles, count and return the number of paths to reach the right-bottom cell from the top-left cell. A cell in the given maze has a value -1 if it is a blockage or de...read more
Q44. Check wether a given binary tree is a BST or not
To check if a binary tree is a BST, we can perform an in-order traversal and ensure that the elements are in sorted order.
Perform an in-order traversal of the binary tree
Check if the elements are in sorted order
If any element is not in sorted order, then the tree is not a BST
You have been given two singly Linked Lists, where each of them represents a positive number without any leading zeros.
Your task is to add these two numbers and print the summation in the ...read more
Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.
Example :
Merge Sort Algorithm - Merge sort is a Di...read more
You are given an integer 'N'. You need to find the sum of squares of the first 'N' natural numbers.
For example:
If 'N' = 4. You need to return 1^2 + 2^2 + 3^2 + 4^2 = 3...read more
The task is to find the sum of squares of the first 'N' natural numbers.
Iterate from 1 to N and calculate the square of each number
Add all the squares together to get the final sum
Return the sum as the result
You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.
Note:
We cannot use the element at a given ind...read more
Ninja is stuck in a maze which is in a form of a binary tree. He needs your help in order to get out.
Ninja is presently at the node ‘X’. The only exit points of the maz...read more
You are given a list of ‘transactions’ between ‘n’ number of friends. who have to give each other money. The list consists of data of receiver, sender, and transaction.
Your task is to minimiz...read more
Given a sequence of ‘N’ space-separated non-negative integers A[1],A[2],A[3],......A[i]…...A[n]. Where each number of the sequence represents the height of the line drawn at point 'i'. ...read more
Q52. Merge sort using Linked list ( psuedo code )
Merge sort using linked list is a sorting algorithm that divides the list into smaller sublists, sorts them, and then merges them back together.
Create a function to merge two sorted linked lists
Divide the linked list into two halves using slow and fast pointers
Recursively sort the two halves
Merge the sorted halves back together
You have been given an array/list ARR consisting of ‘N’ integers. You are also given a positive integer ‘K’.
Your task is to find the lexicographically smallest ARR that can be o...read more
A person has 3000 bananas and a camel. He wants to transport the maximum number of bananas to a destination 1000 KMs away, using only the camel as a mode of transportation. The camel cann...read more
Q56. how web/internet works?
The web/internet is a network of interconnected devices that communicate through standardized protocols to share information.
Devices connect to the internet through ISPs
Data is transmitted through packets using TCP/IP protocols
Web browsers use HTTP/HTTPS protocols to request and receive web pages
DNS servers translate domain names to IP addresses
Web servers host web pages and respond to requests
Search engines use web crawlers to index web pages for search results
You are given a positive integer N, and you have to find the number of ways to represent N as a sum of cubes of two integers(let’s say A and B), such that:
N = A^3 + B^3.
Note:
1. A should be gre...read more
You are given a class named as BSTIterator that represents an iterator over inorder traversal of a binary search tree. You need to implement the following things as follows:
1. BSTIterator(Node root...read more
Parth is a nerd programmer. He has started learning array/list programming. Parth has received an array/list ‘ARR’ of ‘N’ positive integers as a gift. Parth’s OCD gets triggered every time he s...read more
Given an integer ‘N’, the task is to find its corresponding Roman numeral.
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value I 1 V 5 X 10 L ...read more
Q61. Whole garbage collector and its process in java
Garbage collector in Java manages memory allocation and deallocation automatically.
Garbage collector runs in the background and frees up memory that is no longer in use.
It uses different algorithms like Mark and Sweep, Copying, and Generational.
System.gc() can be used to request garbage collection, but it's not guaranteed to run immediately.
Garbage collector can cause performance issues if not tuned properly.
Java provides tools like jstat and jvisualvm to monitor and analyze ...read more
Q62. Write program for internal implementation of hash map
Program for internal implementation of hash map
Define a hash function to map keys to indices in an array
Create an array of linked lists to handle collisions
Implement methods for adding, removing, and retrieving key-value pairs
Consider resizing the array when it becomes too full
Handle edge cases such as null keys or values
You are given 'N' stones labeled from 1 to 'N'. The 'i-th' stone has the weight W[i]. There are 'M' colors labeled by integers from 1 to 'M'. The 'i-th' stone has the color C[i] which is an int...read more
Q64. Are you agree to visit merchant physically in market ?
Yes, I am willing to visit merchants physically in the market.
I believe that face-to-face interaction is crucial in building strong relationships with clients.
Visiting merchants in the market allows me to understand their needs and concerns better.
It also gives me the opportunity to showcase our products and services in person.
I am comfortable with traveling and have a flexible schedule to accommodate market visits.
You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘N’ days. You can either buy or sell a stock. Also, you can only complete at most 2-transactions. Find ...read more
Given a dataframe ..how to filter the and aggregate the data using pandas
What is linear Regression and assumptions
Filtering and aggregating data in pandas dataframe. Linear regression and its assumptions.
To filter data in pandas, use the 'query' or 'loc' function based on specific conditions
To aggregate data in pandas, use the 'groupby' function along with aggregation methods like 'sum', 'mean', etc.
Linear regression is a statistical technique used to model the relationship between a dependent variable and one or more independent variables
Assumptions of linear regression include linearit...read more
Q67. Do you know how market accept the new product?
Market acceptance of new product depends on various factors such as product features, pricing, competition, and marketing strategies.
Conducting market research to understand customer needs and preferences
Analyzing competitor products and pricing strategies
Developing effective marketing campaigns to create awareness and generate interest
Offering competitive pricing and attractive promotions
Collecting feedback from early adopters and making necessary improvements
Monitoring sale...read more
Questions about scheduling algorithms, dead lock, synchronization etc. were asked.
You are given a Binary Tree. You are supposed to return the length of the diameter of the tree.
The diameter of a binary tree is the length of the longest path between any two end no...read more
Deep linking
scope storage
why constraint layout(flat structure, lessrendering, responsive)
how to handle run time permissions for aspecific version
Have you integrated payment gateway in any of...read more
You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return ...read more
You have been given a binary tree of integers. You are supposed to find the diagonal traversal(refer to Example) of the given binary tree.
Example:
Consider lines at an angle...read more
Rahul is a programming enthusiast. He is currently learning about arrays/lists. One day his teacher asked him to solve a very difficult problem. The problem was to find the length of ...read more
If we light a stick, it takes 60 minutes to burn completely. What if we light the stick from both sides? It w...read more
Given a numeric string ‘STR’ which is a string containing numeric characters from ‘0’ to ‘9’, you have to encrypt the string by changing each numeric character as shown below:
‘0’ -> ‘9’
‘1’ -...read more
Q76. Design round | Design a notification service
Design a notification service for sending real-time alerts to users.
Use a scalable messaging system like Kafka or RabbitMQ to handle high volume of notifications.
Implement a user preference system to allow users to choose their preferred notification channels (email, SMS, push notifications, etc).
Include a scheduling feature to send notifications at specific times or intervals.
Ensure notifications are personalized and relevant to each user based on their activity or preferenc...read more
You are given a 'M' x 'N' matrix of characters, 'CHARACTER_MATRIX' and a string 'WORD'. Your task is to find and print all occurrences of the string in the given character matrix. You are al...read more
You are given an array/list ‘ARR’ of ‘N’ positive integers and an integer ‘K’. Your task is to check if there exists a subset in ‘ARR’ with a sum equal to ‘K’.
Note: Return true if there ex...read more
You are given a positive number ‘N.’ You need to find all the numbers such that the sum of digits of those numbers to the number itself is equal to ‘N.’
For example:
You are given ‘N’ as 21, th...read more
What is the order of execution of sql clause.
The order of execution of SQL clauses is: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY.
The SELECT clause is executed first to retrieve the desired columns from the table.
The FROM clause is executed next to specify the table(s) from which the data is retrieved.
The WHERE clause is executed after the FROM clause to filter the rows based on specified conditions.
The GROUP BY clause is executed to group the rows based on specified columns.
The HAVING clause is executed after the ...read more
You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.
For example:
If the given string is: STR = "abcde". You h...read more
Why paytm?
How is paytm different from its competition?
What changes you think can be made to make it better?
Can you take your stand for a decision if you believe its correct even when your supe...read more
Finding the count of visitors that came today and count of new visitors that come today
To find the count of visitors and new visitors that came today in a database management system (DBMS).
Use a query to filter the visitors based on the current date.
Count the total number of visitors using the COUNT function.
To find new visitors, compare the current date with the date of their first visit.
Use the DISTINCT keyword to count only unique new visitors.
What is underfitting and overfitting of ML models
Underfitting and overfitting are common problems in machine learning models.
Underfitting occurs when a model is too simple and fails to capture the underlying patterns in the data.
Overfitting happens when a model is too complex and learns the noise or random fluctuations in the training data.
Underfitting leads to high bias and low variance, while overfitting leads to low bias and high variance.
To address underfitting, we can increase model complexity, gather more data, or use...read more
Find the Department wise highest salary of the employees.
The query finds the highest salary for each department.
Use the GROUP BY clause to group the employees by department.
Use the MAX() function to find the highest salary for each department.
Combine the MAX() function with the GROUP BY clause to get the department wise highest salary.
Find the salary of each employee per month.
To find the salary of each employee per month, you need access to a database management system (DBMS) that stores employee data.
Access the DBMS and locate the table that stores employee information.
Identify the column that contains the salary information.
Retrieve the salary data for each employee and calculate the monthly salary.
Store the monthly salary information in a suitable data structure, such as an array of strings.
Explain the concept of Random Forest
Random Forest is an ensemble learning method that combines multiple decision trees to make predictions.
Random Forest is a supervised learning algorithm used for both classification and regression tasks.
It creates a multitude of decision trees and combines their predictions to make a final prediction.
Each decision tree is trained on a random subset of the training data and features.
Random Forest reduces overfitting and improves accuracy compared to a single decision tree.
It ca...read more
What is segementation.
Difference between internal and external fragmentation.
SQL command
ACID properties
Difference between unique primary and foreign key.
Test Cases for Paytm Wallet (at least 10)
You are downloading a file in your system, write test cases for this situation (5-6 TEST CASES)
Although it was an HR round but this question was quite a mix of tech+HR round. Some puzzles and guesstimates were asked.
Q92. How can you be helpful to organisation?
I can be helpful to the organization by analyzing data, identifying trends, and providing insights to support decision-making.
Conduct thorough data analysis to identify patterns and trends
Generate reports and presentations to communicate findings to stakeholders
Collaborate with cross-functional teams to provide insights and recommendations
Utilize tools such as Excel, SQL, and Tableau to analyze and visualize data
Q93. What is the difference between Sales and Marketing
Sales focuses on selling products or services, while marketing focuses on promoting and creating demand for those products or services.
Sales involves direct interaction with customers to close deals
Marketing involves creating strategies to attract and retain customers
Sales is more short-term focused on closing deals, while marketing is more long-term focused on building brand awareness
Sales is more transactional, while marketing is more relationship-oriented
Examples: Salesper...read more
Q94. Can you sell 10 Paytm Devices in one month alongwith so byproducts as well
Yes, I can sell 10 Paytm Devices in one month along with the byproducts.
I have a proven track record of exceeding sales targets in my previous roles.
I will utilize my strong communication and negotiation skills to pitch the benefits of Paytm Devices to potential customers.
I will leverage my network and contacts to reach out to potential clients and generate leads.
I will offer attractive deals and promotions to incentivize customers to purchase the devices and byproducts.
I wil...read more
Q95. Java coding with String / Array
Java coding with String / Array involves manipulating arrays of strings using Java programming language.
Use String array to store multiple strings.
Access elements in the array using index.
Perform operations like sorting, searching, or concatenation on the array.
Q96. Have you find the location exact latlong on Google
Yes, I have found exact latlong locations on Google.
Yes, I have used Google Maps to find exact latlong locations.
I have entered the address or name of the location in the search bar to get the latlong coordinates.
I have also used the 'What's here?' feature on Google Maps to get the latlong coordinates of a specific point on the map.
Q97. What is the cost of new marchant sound boxx rental
Q98. Guesstimate the number of credit cards in India
There are approximately 50-60 million credit cards in circulation in India.
The number of credit cards in India is estimated to be around 50-60 million.
This number has been steadily increasing due to the rise in digital payments and e-commerce.
Major credit card issuers in India include HDFC Bank, SBI, ICICI Bank, and Axis Bank.
Q99. key difference between Business Analyst and a Data Analyst
Business Analyst focuses on business processes and requirements, while Data Analyst focuses on analyzing data to provide insights.
Business Analyst focuses on understanding business processes, identifying needs, and recommending solutions.
Data Analyst focuses on collecting, analyzing, and interpreting data to provide insights and support decision-making.
Business Analyst works closely with stakeholders to gather requirements and ensure solutions meet business needs.
Data Analyst...read more
Q100. Tell me about some formulas of excel
Excel formulas are used to perform calculations and manipulate data in spreadsheets.
SUM: Adds up a range of cells
AVERAGE: Calculates the average of a range of cells
VLOOKUP: Searches for a value in the first column of a table and returns a value in the same row from another column
IF: Performs a logical test and returns one value if the test is true and another if it's false
Top HR Questions asked in Cavinkare
Interview Process at Cavinkare
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month