Visa
30+ Amishi Computer Education Interview Questions and Answers
Q1. Stock Buy and Sell Problem Statement
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 can p...read more
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 most K transactions.
Q2. Given 2 game scenarios for basketball, and given p as the probability of making a basket in an attempt, I have to understand the condition where game1 would be preferable over game2. In first game, I have one t...
read moreComparing 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 preferable. If p is low, game2 is preferable
For example, if p ...read more
Q3. Sorted Order Printing of a BST Array
Given a Binary Tree consisting of 'N' nodes with integer values, your task is to determine the in-order traversal of the Binary Tree.
Input:
The first line contains an integ...read more
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
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 retrieve information from a database, and using POST to sub...read more
Q5. What is most interesting thing about Visa?
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 Visa Checkout and tokenization.
Visa is committed to financia...read more
Q6. Which one would you solve and how and why?
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?
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.
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 external security measures.
SOAP is commonly used in enterprise...read more
Q9. Given the above Binary search tree, print in ascending order
Print the given Binary search tree in ascending order
Traverse the left subtree recursively
Print the root node
Traverse the right subtree recursively
Q10. What are three problems Chennai faces?
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.
Q11. Given an array, Implement Binary search tree
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
Q12. how does ajax call work
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)}});
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 getter methods.
Q14. how do you create immutable in java
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
Q15. where have you used immutable in java
Immutable is used in Java to create objects whose state cannot be changed after creation.
Immutable objects are thread-safe and can be shared without the risk of data corruption.
Examples of immutable classes in Java include String, Integer, and LocalDate.
Immutable objects can be created using the final keyword, constructor initialization, and static factory methods.
Q16. explain the react lifecycle functions and how they work
React lifecycle functions are methods that are automatically called at specific points in a component's life cycle.
Mounting: constructor, render, componentDidMount
Updating: render, componentDidUpdate
Unmounting: componentWillUnmount
Q17. How Visa works Can you design a scalable file access system like dropbox or google drive?
Visa is a payment processing company that facilitates electronic funds transfers globally.
Visa operates a network that connects financial institutions, merchants, and consumers worldwide.
The company provides payment products and services, including credit and debit cards, prepaid cards, and digital wallets.
Visa's payment processing system involves authorization, clearing, and settlement of transactions.
To design a scalable file access system like Dropbox or Google Drive, one ...read more
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
Q19. Calculate the time taken by kth person to collect n number of tickets
The time taken by the kth person to collect n number of tickets can be calculated using a formula.
Use the formula: time = (n - 1) * k
Subtract 1 from n because the first person doesn't need to wait for anyone
Multiply the result by k to get the time taken by the kth person
Example: If n = 5 and k = 3, the time taken by the 3rd person would be (5 - 1) * 3 = 12
Q20. what is observer pattern
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
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.
Q22. difference between REST and SOAP
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 Services.
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
Q24. css box model, difference between padding and margin
Padding is the space inside the border of an element, while margin is the space outside the border.
Padding is used to create space between the content and the border of an element.
Margin is used to create space between the border of an element and other elements.
Padding affects the size of the content area, while margin affects the positioning of the element.
Example: padding: 10px will create 10 pixels of space inside the border of an element.
Example: margin: 20px will create...read more
Q25. what is immutable in java
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.
Q26. write code in python using pandas to perform certain tasks
Using pandas in Python to perform tasks for a Software Engineer interview question
Import pandas library
Read data from a CSV file using pandas
Perform data manipulation and analysis using pandas functions
Write the processed data back to a new CSV file
Q27. what is GET and POST
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
Q28. Design autocomplete in IDEs
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
Examples of IDEs with autocomplete include Visual Studio Code...read more
Q29. what is CORS
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 cookies, scripts, and APIs
Q30. what is singleton
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.
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.
Q32. Two Sum of numbers with given target value
Given an array of integers, find two numbers that add up to a given target value.
Use a hash map to store the difference between the target value and each element in the array.
Iterate through the array and check if the current element exists in the hash map.
If it does, return the indices of the two numbers.
If no solution is found, return an empty array.
Q33. What is class in java
A class in Java is a blueprint or template for creating objects that encapsulate data and behavior.
A class can contain fields, methods, constructors, and nested classes
Objects are instances of a class
Inheritance allows a class to inherit properties and methods from another class
Polymorphism allows objects of different classes to be treated as if they are of the same class
Example: class Car { String make; int year; void start() { ... } }
Example: Car myCar = new Car(); myCar.ma...read more
Q34. Seperation of even and odd numbers
Separate even and odd numbers in an array
Iterate through the array and check if each number is even or odd
Create two separate arrays for even and odd numbers
Add the even numbers to the even array and odd numbers to the odd array
Return both arrays as the result
More about working at Visa
Top HR Questions asked in Amishi Computer Education
Interview Process at Amishi Computer Education
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month