Add office photos
Employer?
Claim Account for FREE

LinkedIn

4.3
based on 183 Reviews
Video summary
Filter interviews by

10+ PER-SFT Interview Questions and Answers

Updated 16 May 2024
Popular Designations

Q1. Determine Count of Good Triplets

You are given two arrays ARR1 and ARR2, containing N and M elements respectively. There are two types of 'good triplets' that need to be identified in these arrays.

Type 1: A tr...read more

Ans.

Calculate the total number of 'good triplets' in two arrays based on given conditions.

  • Iterate through all possible triplets in both arrays and check if they satisfy the conditions

  • Use nested loops to iterate through all combinations of indices in both arrays

  • Check the conditions for Type 1 and Type 2 'good triplets' separately

  • Increment a counter for each valid 'good triplet' found

  • Return the total count of 'good triplets' for each test case

Add your answer

Q2. Split the String Problem Statement

You are given a string str consisting of N lowercase alphabets. Your task is to determine if it is possible to divide the string into three non-empty substrings such that one ...read more

Ans.

Given a string, determine if it can be split into three non-empty substrings where one is a substring of the other two.

  • Check if any substring of the string is a substring of the other two substrings.

  • Iterate through all possible divisions of the string into three non-empty substrings.

  • Use two pointers to find all possible substrings efficiently.

Add your answer

Q3. Check if Two Trees are Mirror

Given two arbitrary binary trees, your task is to determine whether these two trees are mirrors of each other.

Explanation:

Two trees are considered mirror of each other if:

  • The r...read more
Ans.

Check if two binary trees are mirrors of each other based on specific criteria.

  • Compare the roots of both trees.

  • Check if the left subtree of the first tree is the mirror of the right subtree of the second tree.

  • Verify if the right subtree of the first tree is the mirror of the left subtree of the second tree.

Add your answer

Q4. DFS Traversal Problem Statement

Given an undirected and disconnected graph G(V, E), where V is the number of vertices and E is the number of edges, the connections between vertices are provided in the 'GRAPH' m...read more

Ans.

DFS traversal to find connected components in an undirected and disconnected graph.

  • Use Depth First Search (DFS) to traverse the graph and find connected components

  • Maintain a visited array to keep track of visited vertices

  • For each unvisited vertex, perform DFS to explore the connected component it belongs to

  • Print the vertices of each connected component in ascending order

Add your answer
Discover PER-SFT interview dos and don'ts from real experiences

Q5. Median of Two Sorted Arrays Problem Statement

Given two sorted integer arrays A and B with sizes N and M respectively, find the median of the combined array that results from merging arrays A and B. If the tota...read more

Ans.

Find the median of two sorted arrays after merging them.

  • Merge the two sorted arrays into one sorted array.

  • Calculate the median based on the length of the combined array.

  • Handle cases where the total number of elements is even or odd.

Add your answer

Q6. 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) to find the shortest path from the starting cell to the last cell.

  • Maintain a queue to explore all possible moves from each cell.

  • Consider the effect of snakes and ladders on the movement of the player.

  • Handle the case where the last cell is unreachable by returning -1.

  • Optimize the solution by using a visited array to avoid revisiting cells.

Add your answer
Are these interview questions helpful?

Q7. Longest Palindromic Subsequence Problem Statement

Given a string A consisting of lowercase English letters, determine the length of the longest palindromic subsequence within A.

Explanation:

  • A subsequence is d...read more
Ans.

Find the length of the longest palindromic subsequence in a given string of lowercase English letters.

  • Use dynamic programming to solve this problem efficiently.

  • Create a 2D array to store the lengths of palindromic subsequences for different substrings.

  • Fill the array diagonally based on the characters in the string.

  • Return the length of the longest palindromic subsequence for each test case.

Add your answer

Q8. Stack with getMin Operation

Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity without usi...read more

Ans.

Implement a stack with push, pop, top, isEmpty, and getMin operations in O(1) time complexity without using extra space for storing additional stack data structures.

  • Use two stacks - one to store the actual elements and another to store the minimum element at each level of the main stack.

  • When pushing an element, compare it with the current minimum and update the minimum stack accordingly.

  • For getMin operation, simply return the top element of the minimum stack.

  • Ensure all operat...read more

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

Q9. Binary Tree to Doubly Linked List

Transform a given Binary Tree into a Doubly Linked List.

Ensure that the nodes in the Doubly Linked List follow the Inorder Traversal of the Binary Tree.

Input:

The first line ...read more
Ans.

Convert a Binary Tree into a Doubly Linked List following Inorder Traversal.

  • Perform Inorder Traversal of the Binary Tree to get the nodes in order.

  • Create a Doubly Linked List by linking the nodes in the order obtained from Inorder Traversal.

  • Return the head of the Doubly Linked List as the output.

Add your answer

Q10. Serialize and Deserialize Binary Tree Problem Statement

Given a binary tree of integers, your task is to implement serialization and deserialization methods. You can choose any algorithm for serialization and d...read more

Ans.

Implement serialization and deserialization methods for a binary tree of integers.

  • Use any algorithm for serialization and deserialization.

  • Ensure the serialized string can be correctly decoded back to form the original binary tree.

  • Nodes are separated by spaces, and -1 is used to depict a null node.

  • Output the level order traversal of the deserialized binary tree with nodes separated by single spaces.

Add your answer

Q11. Shuffle Two Strings

You are provided with three strings: A, B, and C. Your task is to determine if C is formed by interleaving A and B. A string C is considered an interleaving of A and B if:

  • The length of C i...read more
Ans.

Determine if a string C is formed by interleaving two strings A and B.

  • Check if the length of C is equal to the sum of lengths of A and B.

  • Ensure all characters of A and B are present in C.

  • Verify that the order of characters in C matches the order in A and B.

Add your answer

Q12. You are given a large array of n bits. Each bit is initially 0. You perform several operations of the type

Ans.

Solution to performing operations on a large array of bits.

  • Use bitwise operators to perform operations on individual bits

  • Use a loop to iterate through the array and perform the operations

  • Ensure that the array is large enough to accommodate all the bits

  • Consider using a data structure like a bitset for efficient bit manipulation

Add your answer

Q13. Palindrome Permutation - Problem Statement

Determine if a permutation of a given string S can form a palindrome.

Example:

Input:
string S = "aab"
Output:
"True"
Explanation:

The permutation "aba" of the string ...read more

Ans.

Check if a permutation of a string can form a palindrome.

  • Create a frequency map of characters in the string.

  • Count the number of characters with odd frequencies.

  • If there is at most one character with an odd frequency, return true.

  • Otherwise, return false.

Add your answer

Q14. Tell me about mud logging work? What is viscosity and density and porosity and permiablity? And related questions in drilling and geology

Ans.

Mud logging involves monitoring drilling parameters to analyze rock formations. Viscosity, density, porosity, and permeability are key properties in drilling and geology.

  • Mud logging involves analyzing drilling cuttings and fluids to determine rock properties and detect hydrocarbons.

  • Viscosity refers to a fluid's resistance to flow, important for maintaining drilling mud circulation.

  • Density is the mass per unit volume of a substance, crucial for balancing well pressure.

  • Porosity...read more

Add your answer
Q15. Describe a map-based design for implementing a code that checks for isomorphic words in a file.
Ans.

Using a map-based design to check for isomorphic words in a file.

  • Create a map where the key is the sorted characters of a word and the value is a list of words with the same sorted characters.

  • Iterate through the file, for each word, sort its characters and check if it exists in the map. If it does, add the word to the list. If not, create a new entry in the map.

  • After processing the file, iterate through the map and output the lists of isomorphic words.

Add your answer

Q16. Sort a stack using a stack

Ans.

Sort a stack using another stack

  • Create an empty temporary stack

  • Pop elements from the original stack and push them onto the temporary stack in sorted order

  • Pop elements from the temporary stack back to the original stack

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

Interview Process at PER-SFT

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

Top Interview Questions from Similar Companies

4.0
 • 376 Interview Questions
4.1
 • 278 Interview Questions
3.9
 • 209 Interview Questions
3.9
 • 198 Interview Questions
4.1
 • 161 Interview Questions
3.7
 • 134 Interview Questions
View all
Top LinkedIn 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