Visa
30+ SBM Offshore 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
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
Q4. 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
Q8. 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?
Q10. 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
Q11. 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.
Q12. 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
Q14. 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)}});
Q15. 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
Q17. 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.
Q19. 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
Q20. 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
Q22. 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
Q23. 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
Q24. 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.
Q25. 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
Q26. 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.
Q27. 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
Q28. 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
Q29. 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
Q30. 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
Q31. 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.
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 SBM Offshore
Interview Process at SBM Offshore
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month