Add office photos
Employer?
Claim Account for FREE

Visa

3.5
based on 364 Reviews
Video summary
Filter interviews by

40+ Khandelwal Public School Interview Questions and Answers

Updated 9 Jan 2025
Popular Designations

Q1. 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 more
Ans.

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 preferable. If p is low, game2 is preferable

  • For example, if p ...read more

Add your answer

Q2. Maximum Equal Elements After K Operations

You are provided with an array/list of integers named 'ARR' of size 'N' and an integer 'K'. Your task is to determine the maximum number of elements that can be made eq...read more

Ans.

Determine the maximum number of elements that can be made equal by performing at most K operations on an array of integers.

  • Sort the array in non-decreasing order to easily identify the elements that need to be increased

  • Calculate the difference between adjacent elements to determine the number of operations needed to make them equal

  • Keep track of the total number of operations used and the maximum number of elements that can be made equal

Add your answer

Q3. Ninja's Dance Competition Pairing Problem

Ninja is organizing a dance competition and wants to pair participants using a unique method. Each participant chooses a number upon entry, and Ninja selects a number ‘...read more

Ans.

Find the number of distinct pairs of participants with a given difference in chosen numbers.

  • Iterate through the array and for each element, check if the pair exists with the required difference 'K'.

  • Use a hash set to keep track of unique pairs to avoid counting duplicates.

  • Return the size of the hash set as the final count of distinct pairs.

Add your answer

Q4. Find Maximum Length Sub-array with Specific Adjacent Differences

Given an array of integers ‘A’ of length ‘N’, find the maximum length of a sub-array where the absolute difference between adjacent elements is e...read more

Ans.

Find the maximum length of a sub-array with adjacent differences of 0 or 1 in an array of integers.

  • Iterate through the array and keep track of the current sub-array length with adjacent differences of 0 or 1.

  • Update the maximum length encountered so far as you traverse the array.

  • Return the maximum length found as the result.

View 1 answer
Discover Khandelwal Public School interview dos and don'ts from real experiences

Q5. What is most interesting thing about Visa?

Ans.

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

Add your answer

Q6. Which one would you solve and how and why?

Ans.

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?

Add your answer
Are these interview questions helpful?

Q7. LRU Cache Design Question

Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:

1. get(key) - Return the value of the key if it exists in the cache; otherwise, re...read more

Ans.

Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.

  • Use a combination of hashmap and doubly linked list to implement the LRU cache.

  • Keep track of the least recently used item and evict it when the cache reaches its capacity.

  • Update the position of an item in the cache whenever it is accessed to maintain the order of recently used items.

Add your answer

Q8. Valid String Problem Statement

You are provided with a string S containing only three types of characters: ('), )'), and *.

Explanation:

A Valid String is characterized by the following conditions:

1. Each left...read more
Ans.

Check if a given string containing parentheses and asterisks is valid based on certain conditions.

  • Iterate through the string and keep track of the count of left parentheses, right parentheses, and asterisks.

  • Use a stack to keep track of the positions of left parentheses and asterisks.

  • If at any point the count of right parentheses exceeds the count of left parentheses and asterisks, the string is invalid.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Count Pairs with Given Sum

Given an integer array/list arr and an integer 'Sum', determine the total number of unique pairs in the array whose elements sum up to the given 'Sum'.

Input:

The first line contains ...read more
Ans.

Count the total number of unique pairs in an array whose elements sum up to a given value.

  • Use a hashmap to store the frequency of each element in the array.

  • Iterate through the array and for each element, check if (Sum - current element) exists in the hashmap.

  • Increment the count of pairs if the complement exists in the hashmap.

Add your answer

Q10. Minimum Cost to Reach End Problem

You are provided with an array ARR of integers of size 'N' and an integer 'K'. The goal is to move from the starting index to the end of the array with the minimum possible cos...read more

Ans.

Find minimum cost to reach end of array by jumping with constraints

  • Use dynamic programming to keep track of minimum cost at each index

  • Iterate through the array and update the minimum cost based on reachable indices within K steps

  • Calculate cost to jump from current index to reachable indices and update minimum cost accordingly

Add your answer

Q11. Given the above Binary search tree, print in ascending order

Ans.

Print the given Binary search tree in ascending order

  • Traverse the left subtree recursively

  • Print the root node

  • Traverse the right subtree recursively

Add your answer

Q12. What are three problems Chennai faces?

Ans.

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.

Add your answer

Q13. Given an array, Implement Binary search tree

Ans.

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

Add your answer

Q14. Design autocomplete in IDEs

Ans.

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

Add your answer

Q15. What is class in java

Ans.

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

Add your answer

Q16. Longest Common Subsequence Problem Statement

Given two strings STR1 and STR2, determine the length of their longest common subsequence.

A subsequence is a sequence that can be derived from another sequence by d...read more

Ans.

The task is to find the length of the longest common subsequence between two given strings.

  • Implement a function to find the longest common subsequence between two strings.

  • Use dynamic programming to solve the problem efficiently.

  • Iterate through the strings and build a matrix to store the lengths of common subsequences.

  • Return the length of the longest common subsequence.

  • Example: For input STR1 = 'abcde' and STR2 = 'ace', the longest common subsequence is 'ace' with a length of ...read more

Add your answer

Q17. Second Most Repeated Word Problem Statement

You are given an array of strings ARR. The task is to find out the second most frequently repeated word in the array. It is guaranteed that each string in the array h...read more

Ans.

Find the second most repeated word in an array of strings with unique frequencies.

  • Iterate through the array and count the frequency of each word using a hashmap.

  • Sort the hashmap by frequency in descending order.

  • Return the second key in the sorted hashmap.

Add your answer

Q18. Graph Connectivity Queries Problem

Given a graph with N nodes and a threshold value THRESHOLDVALUE, two distinct nodes X and Y are directly connected if there exists a Z such that:

X % Z == 0
Y % Z == 0
Z >= THRE...read more
Ans.

Determine if two nodes in a graph are connected directly or indirectly based on a given threshold value and queries.

  • Iterate through each query and check if the nodes are connected based on the given conditions

  • Use the concept of greatest common divisor (GCD) to determine connectivity

  • Return a list of 1s and 0s indicating connectivity for each query

Add your answer

Q19. Four Keys Keyboard Problem Statement

Imagine you have a special keyboard with four keys:

  • Key 1: (A) to print one ‘A’ on screen.
  • Key 2: (Ctrl-A) to select the entire screen.
  • Key 3: (Ctrl-C) to copy the selectio...read more
Ans.

Given a special keyboard with four keys, determine the maximum number of 'A's that can be printed on the screen by pressing the keys 'N' times.

  • Use dynamic programming to keep track of the maximum number of 'A's that can be printed at each step.

  • At each step, consider the possibilities of pressing 'A', 'Ctrl-A', 'Ctrl-C', and 'Ctrl-V'.

  • Optimally choose the sequence of keys to maximize the number of 'A's printed on the screen.

  • Example: For N = 7, the optimal sequence is: A, A, A, ...read more

Add your answer

Q20. Snake and Ladder Problem Statement

Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, find th...read more

Ans.

Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.

  • Use Breadth First Search (BFS) algorithm to find the shortest path from start to end cell.

  • Create a mapping of each cell to its corresponding row and column on the board.

  • Consider the special cases of snakes and ladders while calculating the next possible moves.

  • Keep track of visited cells to avoid revisiting them during the traversal.

Add your answer

Q21. N Queens Problem

Given an integer N, find all possible placements of N queens on an N x N chessboard such that no two queens threaten each other.

Explanation:

A queen can attack another queen if they are in the...read more

Ans.

The N Queens Problem involves finding all possible placements of N queens on an N x N chessboard where no two queens threaten each other.

  • Use backtracking algorithm to explore all possible configurations.

  • Keep track of rows, columns, and diagonals to ensure queens do not threaten each other.

  • Generate all valid configurations and print them out.

  • Consider edge cases like N = 1 or N = 2 where no valid configurations exist.

Add your answer

Q22. Analytic que- Two trains start from equator and start running in different direction and they will never collide…so which train will have more wear n tear first…9use concept of rotation,relative motion and air...

read more
Ans.

Two trains starting from equator in opposite directions will not collide. Which train will have more wear and tear first?

  • The train moving towards the east will have more wear and tear due to the rotation of the earth

  • The train moving towards the west will have less wear and tear due to the rotation of the earth

  • Air resistance will also affect the wear and tear of the trains

  • The train moving towards the east will face more air resistance than the train moving towards the west

Add your answer

Q23. Where should u prefer BUS topology instead of ring topology and vice verse

Ans.

BUS topology is preferred for small networks while ring topology is preferred for larger networks.

  • BUS topology is easier to install and maintain than ring topology.

  • Ring topology is more fault-tolerant than BUS topology.

  • BUS topology is suitable for small networks with few devices while ring topology is suitable for larger networks with many devices.

  • Ring topology is more expensive than BUS topology.

  • Examples of BUS topology include Ethernet and USB while examples of ring topolog...read more

Add your answer

Q24. Explain the Concepts of OOPS , abstraction inheritance polymorphism and encapsulation.

Ans.

OOPS concepts include abstraction, inheritance, polymorphism, and encapsulation.

  • Abstraction: Hiding implementation details and showing only necessary information.

  • Inheritance: Creating new classes from existing ones, inheriting properties and methods.

  • Polymorphism: Using a single method to perform different actions based on the object type.

  • Encapsulation: Binding data and methods together, protecting data from outside interference.

Add your answer

Q25. SDLC and different type of model and steps in different model

Ans.

SDLC refers to the process of software development. Different models include Waterfall, Agile, Spiral, and V-Model.

  • Waterfall model follows a linear sequential approach with distinct phases like planning, design, development, testing, and maintenance.

  • Agile model emphasizes on iterative and incremental development with continuous feedback and collaboration between cross-functional teams.

  • Spiral model combines the elements of both Waterfall and Agile models with risk analysis and...read more

Add your answer

Q26. Tell me your expected monthly income?

Ans.

I am expecting a competitive salary based on my experience and the responsibilities of the role.

  • I am open to negotiation based on the company's budget and benefits package.

  • I have researched the average salary range for this position in the industry and location.

  • I am confident in my skills and experience and believe I can bring value to the company.

  • I am looking for a fair and reasonable compensation package that reflects my contributions to the company's success.

Add your answer

Q27. design google-pay

Ans.

Design Google Pay - a digital wallet platform for online payments and transactions.

  • Allow users to securely store payment information such as credit/debit cards, bank accounts, and loyalty cards.

  • Enable users to make payments in stores, online, and within apps using their stored payment methods.

  • Implement security features like biometric authentication, tokenization, and encryption to protect user data.

  • Provide features for splitting bills, requesting money, and sending money to ...read more

Add your answer

Q28. HLD of recursive

Ans.

High Level Design (HLD) of recursive functions in software development.

  • Recursive functions call themselves to solve smaller instances of the same problem.

  • HLD of recursive functions involves defining the base case, recursive case, and termination condition.

  • Example: HLD of a recursive function to calculate factorial of a number involves defining base case as factorial(0) = 1.

Add your answer

Q29. Sorting algorithms in any language

Ans.

Sorting algorithms are used to arrange elements in a specific order in an array.

  • Common sorting algorithms include Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort.

  • Each algorithm has its own time complexity and best/worst case scenarios.

  • For example, Merge Sort has a time complexity of O(n log n) and is efficient for large datasets.

Add your answer

Q30. Difference b/w Micro kernel and macro kernel

Ans.

Microkernel is a minimalistic approach where only essential services are kept in kernel space while macrokernel has more services in kernel space.

  • Microkernel has a small kernel with minimal services while macrokernel has a large kernel with many services.

  • In microkernel, most services run in user space while in macrokernel, most services run in kernel space.

  • Microkernel is more secure and reliable while macrokernel is faster and more efficient.

  • Examples of microkernel-based oper...read more

Add your answer

Q31. Diff between rdbms dbms

Ans.

RDBMS is a type of DBMS that stores data in a structured format with relationships between tables.

  • RDBMS enforces ACID properties for database transactions.

  • RDBMS uses SQL for querying and managing data.

  • DBMS is a general term for any system that manages databases, while RDBMS is a specific type.

  • DBMS may not support relationships between tables like RDBMS does.

Add your answer

Q32. what is RDBMD? how can it be rationalize

Ans.

RDBMD stands for Relational Database Management System. It is a software system used for managing relational databases.

  • RDBMD is used to store, retrieve, and manage data in a structured format.

  • It allows users to define, create, and manipulate tables, indexes, and relationships between data.

  • Examples of RDBMD include MySQL, Oracle Database, and Microsoft SQL Server.

Add your answer

Q33. explain microservices and Kubernetes, low code/ no code

Ans.

Microservices are a software development technique where applications are composed of small, independent services that communicate over well-defined APIs. Kubernetes is an open-source platform for automating deployment, scaling, and managing containerized applications.

  • Microservices break down applications into smaller, loosely coupled services that can be developed, deployed, and scaled independently.

  • Kubernetes is used to automate the deployment, scaling, and management of co...read more

Add your answer

Q34. Diff b/w Interface and Abstract class

Ans.

Interface is a blueprint of a class while Abstract class is a partially implemented class.

  • An interface can only have abstract methods while an abstract class can have both abstract and non-abstract methods.

  • A class can implement multiple interfaces but can only inherit from one abstract class.

  • Interfaces are used to achieve multiple inheritance while abstract classes are used to provide a common base for related classes.

  • Interfaces are used to define contracts while abstract cla...read more

Add your answer

Q35. function to create a transaction bin column

Ans.

Create a function to generate a transaction bin column based on transaction amounts.

  • Create bins based on transaction amounts (e.g. $0-$100, $101-$200, etc.)

  • Use pandas cut() function in Python to create bins

  • Assign bin labels to the transactions based on the bin ranges

Add your answer

Q36. Opps concept in java

Ans.

Oops concept in Java refers to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation involves bundling data and methods that operate on the data into a single unit.

  • Polymorphism allows objects to be treated as instances of their parent class.

  • Abstraction hides the implementation details and only shows the necessary features to the outsid...read more

Add your answer

Q37. Difference b/w argument and parameter

Ans.

Argument is the actual value passed to a function, while parameter is a variable used to define a function.

  • Parameter is a variable in the function declaration, while argument is the actual value passed to the function.

  • Parameter is used to initialize the function's variables, while argument is used to pass values to the function.

  • Example: function add(a, b) { return a + b; } add(2, 3); Here, a and b are parameters, while 2 and 3 are arguments.

Add your answer

Q38. Different topology in networking

Ans.

Different topology refers to the arrangement of nodes in a network.

  • Common topologies include bus, star, ring, mesh, and hybrid

  • Bus topology connects all devices to a single cable

  • Star topology connects all devices to a central hub

  • Ring topology connects devices in a circular loop

  • Mesh topology connects devices in a network where each device has a direct connection to every other device

  • Hybrid topology is a combination of two or more topologies

  • Topology affects network performance, ...read more

Add your answer

Q39. Explain working of IDS and IPS

Ans.

IDS and IPS are security systems that monitor network traffic for malicious activity and prevent attacks.

  • IDS (Intrusion Detection System) detects and alerts about potential attacks by analyzing network traffic and comparing it to known attack patterns.

  • IPS (Intrusion Prevention System) goes a step further by actively blocking malicious traffic and preventing attacks from happening.

  • Both systems use a combination of signature-based and behavior-based detection methods to identif...read more

Add your answer

Q40. Indexes in DBMS

Ans.

Indexes in DBMS are used to improve the performance of database queries.

  • Indexes are data structures that allow for faster retrieval of data from a database.

  • They work by creating a separate structure that contains a subset of the data in the table, organized in a way that makes it faster to search.

  • Indexes can be created on one or more columns in a table.

  • Examples of indexes include primary keys, unique indexes, and clustered indexes.

  • Indexes can also be used to enforce constrain...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Khandelwal Public School

based on 14 interviews
Interview experience
4.1
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.0
 • 637 Interview Questions
3.8
 • 376 Interview Questions
3.8
 • 351 Interview Questions
3.6
 • 339 Interview Questions
4.0
 • 240 Interview Questions
4.2
 • 173 Interview Questions
View all
Top Visa Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter