Filter interviews by
JavaScript,CSS.HTML.REACT.JS.NODE.JS.REST API
Apptitude, reasoning, English mathematics ,Trignmatry
Top trending discussions
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
I appeared for an interview in Nov 2016.
Need more context. What needs to be done with the large rectangle?
What are the dimensions of the rectangle?
Is it a 2D or 3D object?
What is the context of the problem?
Are there any constraints or limitations?
What tools or programming languages can be used?
Derive a formula to determine how many smaller rectangles fit into a bigger rectangle given their dimensions.
Calculate the number of times the smaller rectangle can fit into the bigger rectangle horizontally and vertically
Divide the width of the bigger rectangle by the width of the smaller rectangle to get the horizontal count
Divide the height of the bigger rectangle by the height of the smaller rectangle to get the ve...
At least 4 points are required to draw a rectangle.
A rectangle has 4 sides and 4 corners, so at least 4 points are needed to define those corners.
The points must be arranged in a specific order to form a closed shape with 4 sides.
Additional points can be used to add details or modify the shape of the rectangle.
The number of points required may vary depending on the software or tool used to draw the rectangle.
Answering how to calculate new coordinates of a scaled rectangle and providing a program for it.
To calculate new coordinates, multiply the original coordinates by the scaling factor
Scaling factor can be calculated by dividing the new length/breadth by the original length/breadth
Program can take input of original coordinates, scaling factor, and output new coordinates
Example: Original coordinates: (0,0), (0,5), (5,5), (...
There are two ways to throw an exception in exception handling.
Exceptions can be thrown using the throw keyword.
Exceptions can also be thrown implicitly by the runtime system.
Examples of explicit throwing include throw new Exception() and throw new IOException().
Examples of implicit throwing include division by zero or null pointer dereference.
Reverse a given string using array of characters.
Create an empty array to store the reversed string.
Loop through the original string from end to start.
Push each character into the empty array.
Join the array to form the reversed string.
Copy constructor creates a new object by copying an existing object, while assignment operator assigns the value of an existing object to another object.
Copy constructor is used to initialize a new object with the values of an existing object.
Assignment operator is used to assign the value of an existing object to another object.
Copy constructor is called when a new object is created from an existing object.
Assignment ...
A copy constructor is used to create a new object with the same values as an existing object. We implement our own to ensure proper copying of data members.
A copy constructor is needed when we want to create a new object with the same values as an existing object.
If we don't implement our own copy constructor, the default copy constructor provided by the compiler may not copy data members properly.
We can implement our ...
QT framework is used for developing cross-platform applications with a single codebase.
QT provides a wide range of libraries and tools for developing GUI applications.
QT supports multiple platforms including Windows, Linux, macOS, Android, and iOS.
QT has a large community and extensive documentation.
QT is written in C++ and supports other programming languages like Python and Java.
QT is used by companies like Autodesk,...
RTTI stands for Run-Time Type Identification.
RTTI is a feature in C++ that allows the type of an object to be determined at runtime.
It is used to implement dynamic_cast, typeid, and exception handling.
RTTI can be used to check if an object is of a certain type before casting it.
It can also be used to determine the type of an object in order to perform specific operations on it.
I have used the Singleton and Factory design patterns in my previous projects.
Singleton pattern was used to ensure only one instance of a class is created and provide a global point of access to it.
Factory pattern was used to create objects without exposing the instantiation logic to the client and provide a way to create objects of a family without specifying their concrete classes.
QT supports multiple operating systems and cross-compilation is possible.
QT supports Windows, macOS, Linux, Android, iOS, and many other operating systems.
Cross-compilation is possible, meaning you can compile for different operating systems on a single machine.
QT also supports embedded systems like Raspberry Pi and BeagleBone.
QT provides pre-built binaries for some operating systems, but for others, you may need to co...
QPointer is a deprecated Qt class used for storing and managing pointers.
QPointer is used to avoid dangling pointers in Qt applications.
It is a template class that can be used with any QObject-derived class.
QPointer is now deprecated and replaced by QWeakPointer.
QPointer can be used to check if a QObject is still valid before accessing it.
dpointer is a Qt framework concept used for efficient memory management.
dpointer is a private implementation pointer.
It is used to hide implementation details from the public API.
dpointer allows for copy-on-write semantics.
It reduces memory usage and improves performance.
Example: QString uses dpointer to store its data.
Example: QSharedDataPointer is used to share data between objects.
I have used Qt version 5.12.3 for my previous project.
Qt version 5.12.3 was used in my previous project
I have experience working with Qt 5.15.2 as well
I am familiar with the features and functionalities of Qt 5.12.3
To check if a linked list is circular, use two pointers, one moving at twice the speed of the other. If they meet, the list is circular.
Use two pointers, one moving at twice the speed of the other
If the faster pointer catches up to the slower pointer, the list is circular
If the faster pointer reaches the end of the list, the list is not circular
Find the merge point of 2 linked lists.
Traverse both lists and find their lengths
Move the pointer of the longer list to the same distance as the shorter list
Move both pointers until they meet at the merge point
If there is no merge point, return null
To find a string in a sorted array of strings.
Use binary search algorithm to search for the string in the array.
Compare the search string with the middle element of the array.
If the search string is less than the middle element, search in the left half of the array.
If the search string is greater than the middle element, search in the right half of the array.
Repeat the process until the string is found or the search sp
Singleton class is a design pattern that restricts the instantiation of a class to one object.
To create a singleton, we need to make the constructor private and provide a static method to get the instance of the class.
To delete the singleton object, we can simply set the instance to null.
Singletons are useful when we need to ensure that only one instance of a class exists throughout the application.
Example: Logger clas...
Dynamic memory allocation in C/C++ is done using malloc(), calloc(), realloc() functions. C++ also has new and delete operators.
malloc() allocates memory block of specified size
calloc() allocates memory block and initializes it to zero
realloc() changes the size of previously allocated memory block
new operator in C++ allocates memory and calls constructor
delete operator in C++ deallocates memory and calls destructor
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...
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...
based on 1 review
Rating in categories
Team Lead
561
salaries
| ₹2.1 L/yr - ₹10 L/yr |
Associate
472
salaries
| ₹0.4 L/yr - ₹4.5 L/yr |
Process Associate
365
salaries
| ₹1.4 L/yr - ₹4.5 L/yr |
Channel Team Lead
236
salaries
| ₹4.8 L/yr - ₹13 L/yr |
Supervisor
224
salaries
| ₹1.3 L/yr - ₹5 L/yr |
IKS Health
McDonald's
AB InBev India
FedEx Express