i
Razorpay
Filter interviews by
2 hours HackerEarth coding round
HackerEarth test medium level question
I appeared for an interview in Jun 2017.
Ajax calls allow for asynchronous communication between client and server without reloading the page.
Ajax stands for Asynchronous JavaScript and XML
Uses XMLHttpRequest object to send and receive data
Allows for partial page updates without reloading the entire page
Can handle data in various formats such as JSON, XML, HTML, and plain text
Example: $.ajax({url: 'example.com', success: function(data){console.log(data)}});
REST is lightweight and uses HTTP while SOAP is XML-based and has more features.
REST uses HTTP methods like GET, POST, PUT, DELETE while SOAP uses XML messaging.
REST is stateless while SOAP can maintain state.
REST is faster and easier to use while SOAP is more secure and reliable.
REST is used for web services while SOAP is used for enterprise-level services.
Example of REST: Twitter API. Example of SOAP: Amazon Web Serv
GET and POST are HTTP methods used for sending data to a server.
GET is used to retrieve data from a server
POST is used to submit data to a server
GET requests can be cached and bookmarked
POST requests are not cached and cannot be bookmarked
GET requests have length restrictions
POST requests have no length restrictions
GET requests are less secure than POST requests
Observer pattern is a design pattern in which an object maintains a list of its dependents and notifies them automatically of any state changes.
Also known as publish-subscribe pattern
Used in event-driven systems
Allows loose coupling between objects
Example: A weather station broadcasts weather updates to multiple displays
Example: A stock market ticker notifies multiple investors of stock price changes
Singleton is a design pattern that restricts the instantiation of a class to a single object.
Singleton ensures that only one instance of a class exists in the entire application.
It provides a global point of access to the instance.
Commonly used in scenarios where a single instance needs to coordinate actions across the system.
Example: Database connection manager, logger, configuration manager.
Immutable in Java refers to objects whose state cannot be changed after creation.
String, Integer, and other wrapper classes are immutable in Java.
Immutable objects are thread-safe and can be shared without synchronization.
To create an immutable class, make all fields final and private, and don't provide setters.
Examples of immutable classes in Java include LocalDate, LocalTime, and LocalDateTime.
Creating immutable in Java
Use final keyword to make variables immutable
Use private constructor to prevent object modification
Use defensive copying to prevent modification of mutable objects
Use enum to create immutable objects
Use String class to create immutable strings
Dependency injection is a design pattern that allows objects to receive dependencies rather than creating them internally.
It helps to decouple the code and makes it more testable and maintainable.
It allows for easier swapping of dependencies without changing the code.
There are three types of dependency injection: constructor injection, setter injection, and interface injection.
Example: Instead of creating a database co...
CORS stands for Cross-Origin Resource Sharing. It is a security feature implemented in web browsers to restrict access to resources from different origins.
CORS allows web servers to specify which origins are allowed to access its resources
It is implemented using HTTP headers
CORS prevents malicious websites from accessing sensitive data from other websites
Examples of resources that may be restricted by CORS include cook
CORS can be overcome by configuring the server to allow cross-origin requests.
Configure the server to include the Access-Control-Allow-Origin header
Use JSONP (JSON with Padding) to bypass CORS restrictions
Use a proxy server to make the request on behalf of the client
Use a browser extension to disable CORS restrictions during development
Use a server-side proxy to forward requests to the target server
Autocomplete in IDEs helps developers write code faster by suggesting code snippets and completing code as they type.
Autocomplete should suggest code snippets based on the context of the code being written
Autocomplete should prioritize suggestions based on frequency of use
Autocomplete should also suggest variable and function names
Autocomplete should be customizable to allow for user-defined snippets and suggestions
Exa...
My weakness is public speaking.
I tend to get nervous when speaking in front of large groups.
I am working on improving my public speaking skills by practicing and seeking feedback.
I have taken courses and attended workshops to help me overcome my fear of public speaking.
Comparing 2 basketball game scenarios with different number of trials and baskets required to win
Calculate the probability of winning in each game scenario using binomial distribution formula
Compare the probabilities to determine which game scenario is preferable
In game1, the probability of winning is p. In game2, the probability of winning is the sum of probabilities of making 2 or 3 baskets
If p is high, game1 is pref...
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
Implement Binary Search Tree using given array of strings.
Sort the array in ascending order
Find the middle element and make it the root of the tree
Recursively create left and right subtrees using the left and right halves of the array
Repeat until all elements are added to the tree
Print the given Binary search tree in ascending order
Traverse the left subtree recursively
Print the root node
Traverse the right subtree recursively
Find buy and sell points for maximum profit in an array of stock prices in O(n)
Iterate through the array and keep track of the minimum price seen so far
Calculate the profit at each index by subtracting the minimum price from the current price
Update the maximum profit and buy/sell points accordingly
Return the buy and sell points for maximum profit
Chennai faces problems related to water scarcity, traffic congestion, and pollution.
Water scarcity due to inadequate rainfall and poor management of water resources.
Traffic congestion due to the increasing number of vehicles and poor road infrastructure.
Pollution caused by industries, vehicular emissions, and improper waste disposal.
Need more context on the question to provide an answer.
Please provide more information on the problem to be solved.
Without context, it is difficult to provide a solution.
Can you please provide more details on the problem statement?
Visa is a global payments technology company that connects consumers, businesses, banks and governments in more than 200 countries and territories.
Visa operates the world's largest retail electronic payments network.
VisaNet, the company's global processing system, handles more than 65,000 transaction messages a second.
Visa is constantly innovating to improve payment security and convenience, with initiatives such as Vi...
I appeared for an interview before Apr 2021.
Round duration - 45 minutes
Round difficulty - Easy
This was a technical interview round.
AJAX allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes.
AJAX stands for Asynchronous JavaScript and XML.
It allows web pages to update content without reloading the entire page.
AJAX uses XMLHttpRequest object to send and receive data from a server.
Commonly used in web applications to provide a more responsive user experience.
SOAP is a protocol, while REST is an architectural style for web services.
SOAP is a protocol that uses XML for message format and relies on a request-response model.
REST is an architectural style that uses standard HTTP methods like GET, POST, PUT, DELETE.
SOAP is more rigid and requires more bandwidth, while REST is lightweight and flexible.
SOAP has built-in security features like WS-Security, while REST relies on exte...
GET is used to request data from a server, while POST is used to submit data to a server.
GET requests data from a specified resource, while POST submits data to be processed to a specified resource.
GET requests are cached by browsers, while POST requests are not.
GET requests can be bookmarked and shared, while POST requests cannot.
GET requests have length restrictions, while POST requests do not.
Example: Using GET to r...
The Observer Pattern is a behavioral design pattern where an object (subject) maintains a list of dependents (observers) that are notified of any state changes.
Allows for one-to-many dependency between objects
When the subject's state changes, all observers are automatically notified and updated
Commonly used in event handling systems and GUI frameworks
Round duration - 40 minutes
Round difficulty - Easy
This was the second technical interview round.
A singleton class is a class that can only have one instance created throughout the entire application.
Singleton classes have a private constructor to prevent multiple instances from being created.
They typically provide a static method to access the single instance.
Commonly used for logging, database connections, and configuration settings.
Immutability in Java refers to the property of objects whose state cannot be changed once they are created.
Immutability ensures that once an object is created, its state cannot be modified.
Immutable objects are thread-safe and can be shared without the risk of data corruption.
String class in Java is an example of an immutable class.
To create an immutable class, make the class final, all fields private, and provide only
Dependency injection is a design pattern where components are given their dependencies rather than creating them internally.
Allows for easier testing by providing mock dependencies
Promotes loose coupling between components
Improves code reusability and maintainability
Examples: Constructor injection, Setter injection, Interface injection
To create an immutable class in Java, make the class final, make all fields private and final, provide only getter methods, and do not provide any setter methods.
Make the class final to prevent inheritance.
Make all fields private and final to prevent modification.
Provide only getter methods to access the fields.
Do not provide any setter methods to modify the fields.
Round duration - 30 minutes
Round difficulty - Easy
HR round with typical behavioral problems.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I appeared for an interview before Apr 2021.
Round duration - 60 minutes
Round difficulty - Easy
Technical Interview round with questions on DSA.
You are given an array of integers PRICES
where PRICES[i]
represents the price of a stock on the i-th day, and an integer K
representing the number of transactions you...
Determine maximum profit with at most K transactions by buying and selling stocks on given days.
Iterate through the array of prices while keeping track of the maximum profit achievable with at most K transactions.
Use dynamic programming to store the maximum profit at each day and transaction count.
Consider buying and selling stocks at each day to calculate the maximum profit.
Return the maximum profit achievable with at
Given a Binary Tree consisting of 'N' nodes with integer values, your task is to determine the in-order traversal of the Binary Tree.
The first line contains ...
The task is to determine the in-order traversal of a Binary Tree given in level order.
Implement a function to perform in-order traversal of a Binary Tree
Use recursion to traverse left subtree, visit root, and then traverse right subtree
Handle null nodes denoted by -1 in the input
Round duration - 30 minutes
Round difficulty - Easy
HR round with typical behavioral problems.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I appeared for an interview before Sep 2020.
Round duration - 70 minutes
Round difficulty - Medium
It consisted of three coding questions varying from easy to medium.
You are provided with the root of a binary tree that consists of 'N' nodes. Each node in this tree contains coins, and the total number of coins across all nodes is equ...
Determine the minimum number of moves required to distribute coins in a binary tree so that every node has exactly one coin.
Traverse the binary tree in a bottom-up manner to distribute coins efficiently.
Keep track of the excess or deficit of coins at each node to calculate the minimum moves required.
Transfer coins from nodes with excess coins to nodes with deficits to balance the distribution.
Example: For the input ROO...
Given an array arr
of N integers that may include duplicates, determine the number of subsets of this array containing only distinct elements.
The result should be returned modulo ...
Count the number of distinct-element subsets in an array modulo 10^9+7.
Iterate through the array and keep track of distinct elements using a set.
Calculate the number of subsets using the formula 2^distinct_count - 1.
Return the result modulo 10^9+7 for each test case.
A thief is robbing a store and can carry a maximal weight 'W' in his knapsack. There are 'N' items, where the i-th item has a weight 'wi' and value 'vi'. Consider the maximu...
The 0-1 Knapsack Problem involves maximizing the value of items a thief can steal within a weight limit.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the maximum value that can be achieved at each weight limit.
Iterate through the items and weights to fill the array with optimal values.
Return the maximum value achievable at the given weight limit.
Round duration - 60 minutes
Round difficulty - Medium
The interview was focused on data structures as well as computer fundamentals along with puzzles.
You are given an unsorted array ARR
. Your task is to sort it so that it forms a wave-like array.
The first line contains an integer 'T', the number of test cases.
For ea...
Sort an array in wave form where each element is greater than or equal to its adjacent elements.
Iterate through the array and swap adjacent elements to form a wave pattern.
Ensure that the first element is greater than or equal to the second element.
There can be multiple valid wave arrays, so any valid wave array is acceptable.
You are given a Singly Linked List of integers. Your task is to reverse the Linked List by changing the links between nodes.
The first line of input contai...
Reverse a given singly linked list by changing the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of the current, previous, and next nodes
Update the links between nodes to reverse the list
Return the head of the reversed linked list
Round duration - 90 minutes
Round difficulty - Easy
The Round was mainly focused on resume+ dsa + system design +computer fundamentals
Given a stream of integers, calculate and print the median after each new integer is added to the stream.
Output only the integer part of the median.
N = 5
Stre...
Calculate and print the median after each new integer is added to the stream.
Use a min heap to store the larger half of the numbers and a max heap to store the smaller half.
Keep the two heaps balanced by ensuring the size difference is at most 1.
If the total number of elements is odd, the median is the top of the larger heap. If even, average the tops of both heaps.
LRU cache in a database management system stores most recently used data and removes least recently used data when full.
LRU cache is implemented using a doubly linked list and a hash map.
Each node in the linked list represents a key-value pair.
When a key is accessed, it is moved to the front of the linked list.
If the cache is full, the least recently used node at the end of the list is removed.
Example: If cache size is...
Use two stacks - one to store actual values and one to store minimum values.
Use two stacks - one to store actual values and one to store minimum values
When pushing a new value, check if it is smaller than the current minimum and push it to the min stack if so
When popping a value, check if it is the current minimum and pop from min stack if so
getMin() operation can be done by peeking at the top of the min stack
Tip 1 : Properly grasp over basic concepts
Tip 2 : Prepare good for DS & Algo as most companies have a separate round for it.
Tip 3 : Don't lie over your resume
Tip 1 : Don't Lie over your resume
Tip 2 : Avoid unnecessary details like Hobbies, family details, declaration, date, signature, etc.
SOLID principles are a set of five design principles for writing maintainable and scalable code.
S - Single Responsibility Principle
O - Open/Closed Principle
L - Liskov Substitution Principle
I - Interface Segregation Principle
D - Dependency Inversion Principle
HashSet is a collection that stores unique elements by using a hash table.
Elements are stored based on their hash code
Uses hashCode() and equals() methods to check for duplicates
Does not maintain insertion order
Allows null values
Example: HashSet
based on 1 interview
Interview experience
based on 2 reviews
Rating in categories
Junior Analyst
115
salaries
| ₹2.4 L/yr - ₹5.5 L/yr |
Analyst
102
salaries
| ₹3.5 L/yr - ₹7.3 L/yr |
Software Engineer
95
salaries
| ₹8 L/yr - ₹26.5 L/yr |
Senior Associate
93
salaries
| ₹5.2 L/yr - ₹15 L/yr |
Senior Software Engineer
83
salaries
| ₹15 L/yr - ₹52 L/yr |
Paytm
PayPal
BharatPe
BillDesk