Add office photos
Employer?
Claim Account for FREE

Adobe

4.0
based on 1k Reviews
Filter interviews by

20+ Vailankanni Public School Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations
Q1. Maximum Sum

You are given an array “ARR” of N integers. You are required to perform an operation on the array each time until it becomes empty. The operation is to select an element from the array(let’s say at i...read more

View 4 more answers
Q2. Count Ways To Reach The N-th Stairs

You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are...read more

View 5 more answers
Q3. Detect and Remove Loop

Given a singly linked list, you have to detect the loop and remove the loop from the linked list, if present. You have to make changes in the given linked list itself and return the update...read more

View 4 more answers
Q4. Stack using queue

Implement a Stack Data Structure specifically to store integer data using two Queues.

There should be two data members, both being Queues to store the data internally. You may use the inbuilt Q...read more

View 4 more answers
Discover Vailankanni Public School interview dos and don'ts from real experiences
Q5. Good Arrays

You are given an array ‘A’ of length ‘N’, you have to choose an element from any index in this array and delete it. After deleting the element you will get a new array of length ‘N’-1. Your task is t...read more

View 3 more answers
Q6. Predecessor and Successor In BST

You have been given a binary search tree of integers with ‘N’ nodes. You are also given 'KEY' which represents data of a node of this tree. Your task is to find the predecessor a...read more

View 3 more answers
Are these interview questions helpful?
Q7. Longest Common Prime Subsequence

Ninja got a very long summer vacation. Being very bored and tired about it, he indulges himself in solving some puzzles.

He encountered a problem in which he was given two arrays...read more

View 2 more answers

Q8. Suppose there is an unsorted array. What will be the maximum window size, such that when u sort that window size, the whole array becomes sorted. Eg, 1 2 6 5 4 3 7 . Ans: 4 (6 5 4 3)

Ans.

Find the maximum window size to sort an unsorted array.

  • Identify the longest decreasing subarray from the beginning and longest increasing subarray from the end

  • Find the minimum and maximum element in the identified subarrays

  • Expand the identified subarrays until all elements in the array are covered

  • The length of the expanded subarray is the maximum window size

View 1 answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is merge sort and Quick sort. Adv and Disadv of each and which one would u use to sort huge list and Y

Ans.

Merge sort and Quick sort are sorting algorithms used to sort arrays of data.

  • Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts each half recursively, and then merges the sorted halves.

  • Quick sort is also a divide and conquer algorithm that selects a pivot element and partitions the array around the pivot, sorting the two resulting sub-arrays recursively.

  • Merge sort has a time complexity of O(n log n) and is stable, but requires add...read more

Add your answer

Q10. Puzzle: There is a grid of soldier standing. Soldier ‘A’ is chosen: The tallest men from every column and the shortest among them. Soldier ‘B’ is chosen: The shortest men from every row and the tallest among th...

read more
Ans.

Comparison of heights of two soldiers chosen based on different criteria from a grid of soldiers.

  • Soldier A is chosen based on tallest men from every column and shortest among them.

  • Soldier B is chosen based on shortest men from every row and tallest among them.

  • The height of Soldier A and Soldier B cannot be determined without additional information about the grid of soldiers.

Add your answer

Q11. How to find a loop in a Linked List and how to remove it

Ans.

To find and remove a loop in a Linked List, we can use Floyd's Cycle Detection Algorithm.

  • Use two pointers, slow and fast, to detect if there is a loop in the Linked List

  • If the two pointers meet at some point, there is a loop

  • To remove the loop, set one of the pointers to the head of the Linked List and move both pointers one step at a time until they meet again

  • The meeting point is the start of the loop, set the next pointer of this node to NULL to remove the loop

View 1 answer

Q12. How to find longest last occurring word in a sentence with multiple whitespace

Ans.

Finding the longest last occurring word in a sentence with multiple whitespace.

  • Split the sentence into words using whitespace as delimiter

  • Reverse the list of words

  • Iterate through the list and find the first occurrence of each word

  • Calculate the length of each last occurring word

  • Return the longest last occurring word

Add your answer

Q13. What’s priority queue. How will u make stack and queue with priority queue

Ans.

Priority queue is a data structure that stores elements with priority levels and retrieves them in order of priority.

  • Priority queue is implemented using a heap data structure.

  • Stack can be implemented using a priority queue by assigning higher priority to the most recently added element.

  • Queue can be implemented using a priority queue by assigning higher priority to the oldest element.

Add your answer
Q14. OOPS Question

What is Vtable and VPTR in C++?

Add your answer

Q15. Solve and code the problem of a ball falling from staircase. Each jump can be of 1 step or 2. Find the number of combination of reaching step N

Ans.

Code to find number of combinations of reaching step N by ball falling from staircase with 1 or 2 steps per jump.

  • Use dynamic programming to solve the problem

  • Create an array to store the number of ways to reach each step

  • Initialize the array with base cases for steps 0, 1, and 2

  • Use a loop to fill in the array for steps 3 to N

  • The number of ways to reach step i is the sum of the number of ways to reach step i-1 and i-2

  • Return the value at the Nth index of the array

Add your answer
Q16. OS Question

What is Memory Protection in OS ?

Add your answer

Q17. What happens when an recursive function is called

Ans.

A recursive function calls itself until a base case is reached, then returns the result to the previous call.

  • Each call creates a new instance of the function on the call stack

  • The function continues to call itself until a base case is reached

  • Once the base case is reached, the function returns the result to the previous call

  • The previous call then continues executing from where it left off

Add your answer
Q18. OOPS Question

What Friend Functions in C++?

Add your answer

Q19. Define Process &thread

Ans.

Process is an instance of a program while thread is a subset of a process that can run concurrently with other threads.

  • A process is a program in execution

  • A process can have multiple threads

  • Threads share the same memory space as the process

  • Threads can run concurrently with other threads within the same process

  • Examples of processes include web browsers, word processors, and media players

  • Examples of threads include GUI thread, network thread, and background thread

Add your answer

Q20. Implement stack using queue

Ans.

Implementing stack using queue involves using two queues to simulate stack behavior.

  • Create two queues, q1 and q2.

  • Push operation: Enqueue the element to q1.

  • Pop operation: Dequeue all elements from q1 to q2 except the last element. Dequeue and return the last element.

  • Swap the names of q1 and q2 after each pop operation.

  • Top operation: Return the last element of q1 without dequeuing it.

  • isEmpty operation: Check if both q1 and q2 are empty.

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

Interview Process at Vailankanni Public School

based on 3 interviews in the last 1 year
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Member Technical Staff Interview Questions from Similar Companies

3.7
 • 26 Interview Questions
4.3
 • 16 Interview Questions
3.5
 • 10 Interview Questions
View all
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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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