
BNY


10+ BNY Software Developer Interview Questions and Answers
Q1. Palindromic Substrings Problem Statement
You are given a string 'STR'. Your task is to determine the total number of palindromic substrings present in 'STR'.
Example:
Input:
"abbc"
Output:
5
Explanation:
The pa...read more
Count the total number of palindromic substrings in a given string.
Iterate through each character in the string and expand around it to find palindromic substrings.
Use dynamic programming to store the results of subproblems to avoid redundant calculations.
Consider both odd and even length palindromes while counting.
Example: For input 'abbc', the palindromic substrings are ['a', 'b', 'b', 'c', 'bb'], totaling 5.
Q2. Minimum Number of Taps to Water the Garden
Given a garden that extends along a one-dimensional x-axis from point 0 to point N, your task is to determine the minimum number of taps needed to water the entire gar...read more
Find the minimum number of taps needed to water the entire garden with given tap ranges.
Iterate over each tap and find the maximum range it can cover.
Sort the taps based on their starting point and ending point.
Use a greedy approach to select the taps that cover the maximum range possible.
Q3. Cycle Detection in a Singly Linked List
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the list. T...read more
Detect if a singly linked list forms a cycle by checking if a node's next points back to a previous node.
Use Floyd's Cycle Detection Algorithm to determine if there is a cycle in the linked list.
Maintain two pointers, one moving at twice the speed of the other, if they meet at some point, there is a cycle.
If one of the pointers reaches the end of the list (null), then there is no cycle.
Q4. Sort strings based on your own hierarchy. Ex: INPUT: ABC, HIJ, RTS, POT. Hierarchy: R, P, A, H OUTPUT: RTS, POT, ABC, HIJ.
Sort strings based on custom hierarchy
Create a mapping of each character to its hierarchy value
Sort the strings based on the hierarchy value of their first character
If the first characters have the same hierarchy value, move to the next character
Repeat until all strings are sorted
Q5. Difference between compiler and interpreter in detail.
Compiler translates entire code into machine code while interpreter translates line by line.
Compiler converts source code into executable code without executing it.
Interpreter converts source code into machine code line by line and executes it.
Compiler generates error messages after the entire code is compiled.
Interpreter generates error messages as soon as it encounters an error in the code.
Examples of compilers are GCC, Clang, and Visual C++. Examples of interpreters are Py...read more
Q6. Different types of joins and also a SQL query.
Different types of joins and a SQL query.
Types of joins: Inner join, Left join, Right join, Full outer join, Cross join
Inner join returns only the matching rows from both tables
Left join returns all rows from the left table and matching rows from the right table
Right join returns all rows from the right table and matching rows from the left table
Full outer join returns all rows from both tables
Cross join returns the Cartesian product of both tables
Example query: SELECT * FROM...read more
Q7. What is heap?
Heap is a region of memory used for dynamic memory allocation.
Heap is managed by the operating system or runtime environment.
It allows for allocation and deallocation of memory at runtime.
Heap can become fragmented over time, leading to performance issues.
Examples include malloc() and new() in C++.
Q8. Explain abstraction with real life example and code.
Abstraction is the concept of hiding complex implementation details and showing only the necessary features to the user.
Abstraction in real life: A car dashboard hides the internal workings of the car and only displays necessary information like speed, fuel level, and temperature.
Abstraction in code: Using abstract classes or interfaces in object-oriented programming to define a blueprint for classes to implement.
Example code: abstract class Shape { abstract void draw(); } cl...read more
Q9. What do you mean by growth
Growth refers to the process of development and improvement over time.
Growth can be personal, professional, or organizational.
It involves learning new skills, gaining experience, and expanding one's knowledge.
Examples include career advancement, skill development, and business expansion.
Q10. Explain Hashing.
Hashing is a process of converting data into a fixed-size output using a mathematical function.
Hashing is used for data integrity and security purposes.
Hash functions are one-way functions, meaning it is difficult to reverse engineer the original data from the hash value.
Hashing is used in password storage, digital signatures, and data comparison.
Examples of hash functions include MD5, SHA-1, and SHA-256.
Q11. Projects i worked detail explanation
I have worked on various projects including a web application for a retail company and a mobile app for a fitness startup.
Developed a web application using React and Node.js for a retail company to manage their inventory and sales.
Created a mobile app using React Native for a fitness startup to track workouts and progress.
Collaborated with a team to build a chatbot using Dialogflow and Node.js for a healthcare company.
Implemented a RESTful API using Express.js and MongoDB for...read more
Q12. Palindrome of a string
A palindrome of a string is a word, phrase, number, or other sequence of characters that reads the same forward and backward.
Check if the string is equal to its reverse to determine if it is a palindrome.
Ignore spaces and punctuation when checking for palindromes.
Examples: 'racecar', 'madam', 'A man, a plan, a canal, Panama!'
Q13. Explain insertion sort with psuedocode
Insertion sort is a simple sorting algorithm that builds the final sorted array one item at a time.
Start from the second element and compare it with the elements before it, moving elements to the right until finding the correct position.
Repeat this process for each element in the array until the entire array is sorted.
Example: For an array ['3', '1', '4', '1', '5', '9', '2', '6'], the insertion sort steps would be: ['1', '3', '4', '1', '5', '9', '2', '6'] -> ['1', '1', '3', '...read more
Q14. NORMALISATION IN DBMS
Normalization in DBMS is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization involves breaking down a database into smaller, more manageable tables and defining relationships between them.
It helps in reducing data redundancy by storing data in a structured and organized manner.
Normalization also helps in improving data integrity by ensuring that data is consistent and accurate.
There are different normal forms such as 1NF,...read more
Q15. Explain merge sort
Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts them recursively, and then merges them back together.
Divide the array into two halves
Recursively sort each half
Merge the sorted halves back together
Q16. KMP Search Algorithm
KMP Search Algorithm is a string searching algorithm that finds occurrences of a word within a main text.
KMP algorithm is based on the idea of pre-processing the pattern to avoid unnecessary comparisons.
It uses a prefix function to determine the longest proper prefix of the pattern that is also a suffix.
This allows the algorithm to skip characters in the text that cannot be part of the pattern, improving efficiency.
Q17. Explain Solid patterns
Solid patterns are a set of five design principles to make software designs more understandable, flexible, and maintainable.
Single Responsibility Principle: A class should have only one reason to change.
Open/Closed Principle: Software entities should be open for extension but closed for modification.
Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without affecting the functionality.
Interface Segregation Principle: A ...read more
Interview Process at BNY Software Developer

Top Software Developer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

