Bajaj Finserv
Zphs Mothe School Interview Questions and Answers
Q1. Alien Dictionary Problem Statement
You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictionary. Th...read more
Q2. Flood Fill Algorithm Task
Assist Ninja in altering the color of a specific region in his photo. Given the image as a 2D array where each pixel is a positive integer, update the color of a specified pixel and th...read more
Q3. The Skyline Problem
Compute the skyline of given rectangular buildings in a 2D city, eliminating hidden lines and forming the outer contour of the silhouette when viewed from a distance. Each building is descri...read more
Q4. Reverse Words In A String Problem Statement
Given a string of length N
, reverse the string word by word. Ensure that the output reversed string has a single space between two words and does not contain leading ...read more
Q5. Rat in a Maze Problem Statement
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N matrix w...read more
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions ('U', 'D', 'L', 'R') from each cell.
Return the list of valid paths sorted in alphabetical order.
Q6. Word Presence in Sentence
Determine if a given word 'W' is present in the sentence 'S' as a complete word. The word should not merely be a substring of another word.
Input:
The first line contains an integer 'T...read more
Check if a given word is present in a sentence as a complete word.
Split the sentence into words using spaces as delimiter.
Check if the given word matches any of the words in the sentence.
Ensure the word is not a substring of another word in the sentence.
Q7. longest common subsequence of two string
The longest common subsequence of two strings is the longest sequence of characters that appear in the same order in both strings.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the lengths of the longest common subsequences.
Iterate through the characters of both strings and update the array based on the matching characters.
Trace back the array to find the longest common subsequence.
More about working at Bajaj Finserv
Interview Process at Zphs Mothe School
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month