Member Technical Staff
100+ Member Technical Staff Interview Questions and Answers
Q1. Buy and Sell Stock Problem Statement
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell transa...read more
Q2. Optimal Strategy for a Coin Game
You are playing a coin game with your friend Ninjax. There are N
coins placed in a straight line.
Here are the rules of the game:
1. Each coin has a value associated with it.
2....read more
Member Technical Staff Interview Questions and Answers for Freshers
Q3. Next Smallest Palindrome Problem Statement
Find the next smallest palindrome strictly greater than a given number 'N' represented as a string 'S'.
Explanation:
You are given a number in string format, and your ...read more
Q4. Check Permutation Problem Statement
Given two strings 'STR1' and 'STR2', determine if they are anagrams of each other.
Explanation:
Two strings are considered to be anagrams if they contain the same characters,...read more
Q5. Longest Happy String Problem Statement
Given three non-negative integers X
, Y
, and Z
, determine the longest happy string. A happy string is defined as a string that contains only the letters 'a', 'b', and 'c' w...read more
Q6. Maximum Sum Problem Statement
You are given an array ARR
of N integers. Your task is to perform operations on this array until it becomes empty, and maximize the sum of selected elements. In each operation, sel...read more
Share interview questions and help millions of jobseekers 🌟
Q7. Count Ways to Reach the N-th Stair Problem Statement
You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or two step...read more
Q8. Spiral Matrix Problem Statement
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
Input
The first line contains an integer 'T' which denotes the number of ...read more
Member Technical Staff Jobs
Q9. 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
Q10. Detect and Remove Loop in Linked List
For a given singly linked list, identify if a loop exists and remove it, adjusting the linked list in place. Return the modified linked list.
Expected Complexity:
Aim for a...read more
Q11. Stack using Two Queues Problem Statement
Develop a Stack Data Structure to store integer values using two Queues internally.
Your stack implementation should provide these public functions:
Explanation:
1. Cons...read more
Q12. Good Arrays Problem Statement
You are given an array 'A' of length 'N'. You must choose an element from any index in this array and delete it. After deleting the element, you will obtain a new array of length '...read more
Q13. Minimum Swaps to Sort Array Problem Statement
Given an array arr
of size N
, determine the minimum number of swaps required to sort the array in ascending order. The array consists of distinct elements only.
Exa...read more
Q14. Regular Expression Match Problem Statement
Given a string str
and a string pat
, where str
may contain wildcard characters '?' and '*'.
If a character is '?', it can be replaced with any single character. If a c...read more
Q15. Predecessor and Successor in Binary Search Tree (BST)
Given a binary search tree (BST) with 'N' nodes, find the predecessor and successor of a given 'KEY' node in the BST.
Explanation:
The predecessor of a node...read more
Q16. Move Zeroes to End
Given an unsorted array of integers, adjust the array such that all zeroes are moved to the end while preserving the order of non-zero elements.
Input:
The input provided consists of multiple...read more
Q18. Longest Common Prime Subsequence Problem Statement
Imagine Ninja is tackling a puzzle during his long summer vacation. He has two arrays of integers, each with lengths 'N' and 'M'. Ninja's task is to determine ...read more
Q19. Convert Array to Min Heap Task
Given an array 'ARR' of integers with 'N' elements, you need to convert it into a min-binary heap.
A min-binary heap is a complete binary tree where each internal node's value is ...read more
Q20. Tower of Hanoi Problem Statement
You have three rods numbered from 1 to 3, and 'N' disks initially stacked on the first rod in increasing order of their sizes (largest disk at the bottom). Your task is to move ...read more
Q21. 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)
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
Q22. What is a class in js means? And explain its use case
A class in JavaScript is a blueprint for creating objects with similar properties and methods.
Classes are used to create multiple objects with the same structure and behavior.
They provide a way to organize and encapsulate related data and functions.
Classes can have properties (variables) and methods (functions) that define their behavior.
Instances of a class can be created using the 'new' keyword.
Classes can also have constructors, which are special methods called when an obj...read more
Q23. Merge Sort Problem Statement
Given a sequence of numbers ARR
, your task is to return a sorted sequence of ARR
in non-descending order using the merge sort algorithm.
Explanation:
The Merge Sort Algorithm is a D...read more
Q24. Implementing a Priority Queue Using Heap
Ninja has been tasked with implementing a priority queue using a heap data structure. However, he is currently busy preparing for a tournament and has requested your ass...read more
Q25. What is merge sort and Quick sort. Adv and Disadv of each and which one would u use to sort huge list and Y
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
Q26. 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 moreComparison 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.
Q27. How to find a loop in a Linked List and how to remove it
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
Q29. Given a social networking graph find the density of a person. Density is how many friends he had interaction with him and the person by the total number of friends for that person
Density of a person in a social networking graph is the ratio of friends who interacted with the person to the total number of friends.
Calculate the number of friends who interacted with the person.
Calculate the total number of friends for that person.
Divide the number of interacting friends by the total number of friends to get the density.
Density = (Number of interacting friends) / (Total number of friends)
Q30. How to find longest last occurring word in a sentence with multiple whitespace
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
Q31. What’s priority queue. How will u make stack and queue with priority queue
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.
Q32. Whenever a row in table is modified, how can you make changes to reflect in another related table?
Use triggers to update related table on row modification.
Create a trigger on the main table to update the related table
Use the UPDATE statement in the trigger to modify the related table
Ensure that the trigger is efficient and does not cause performance issues
Test the trigger thoroughly to ensure that it works as expected
Q33. You are given a list of n numbers. How would you find the median in this stream. You are given an array. Give an algorithm to randomly shuffle it.
Algorithm to find median in a stream of n numbers
Sort the list and find the middle element for odd n
For even n, find the average of middle two elements
Use a min-heap and max-heap to maintain the smaller and larger half of the stream respectively
Insert new elements into the appropriate heap and balance the heaps to ensure median is always at the top
Q35. 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
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
Q37. Given 2 arrays of n and n - 1elements which have n - 1 in common find the unique elements
Given 2 arrays with n and n-1 elements, find the unique element in the larger array.
Loop through the larger array and check if each element is present in the smaller array.
If an element is not present in the smaller array, it is the unique element.
Return the unique element.
Example: arr1 = ['a', 'b', 'c', 'd'], arr2 = ['a', 'b', 'c'], unique element = 'd'
Q39. What is a electric current how can much diffen the electricity current and thier parts of electric current?
Electric current is the flow of electric charge through a conductor.
Electric current is measured in amperes (A).
It is caused by the movement of electrons in a conductor.
There are two types of electric current - direct current (DC) and alternating current (AC).
DC flows in one direction, while AC changes direction periodically.
Electric current is made up of three main components - voltage, current, and resistance.
Ohm's Law (V = IR) describes the relationship between these compo...read more
Q40. What is a electronic device how can you define the electronic device how can use the electronic device and it's Parts?
An electronic device is a device that operates using electronic circuits and components to perform various functions.
An electronic device typically consists of a power source, input/output components, a processor, memory, and various other electronic components.
Examples of electronic devices include smartphones, laptops, tablets, and digital cameras.
Electronic devices can be used for communication, entertainment, data processing, and various other purposes.
The parts of an ele...read more
Q42. What happens when an recursive function is called
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
Q44. What is a critical rendering path?
The sequence of steps a browser takes to convert HTML, CSS, and JavaScript into a rendered page.
Includes parsing HTML, constructing the DOM tree, calculating styles, and executing JavaScript.
Optimizing the critical rendering path can improve page load times and user experience.
Examples of optimization techniques include minimizing render-blocking resources and using lazy loading.
The critical rendering path can vary depending on the browser and device being used.
Q45. what is the difference between docker swarm and docker compose ?
Docker Swarm is used for orchestrating multiple Docker containers across multiple hosts, while Docker Compose is used for defining and running multi-container Docker applications.
Docker Swarm is a container orchestration tool that allows you to manage a cluster of Docker hosts.
Docker Compose is a tool for defining and running multi-container Docker applications.
Docker Swarm is used for scaling and managing a cluster of Docker containers, while Docker Compose is used for defin...read more
Q46. Whole concept of VPC , subnet and route table and NAT gateway ?
VPC is a virtual private cloud that allows you to create isolated networks within the cloud environment. Subnets are subdivisions of a VPC, route tables define how traffic is directed within the VPC, and NAT gateway allows instances in a private subnet to access the internet.
VPC is a virtual private cloud that provides a logically isolated section of the AWS Cloud where you can launch resources.
Subnets are subdivisions of a VPC that allow you to group resources based on secur...read more
Q47. WHat is a DG Machine how can you find dg machine and it's Components and thier parts of dg machine?
A DG machine is a diesel generator machine used for generating electricity. Components include engine, alternator, fuel system, cooling system, and control panel.
DG machine stands for Diesel Generator machine.
Components include engine, alternator, fuel system, cooling system, and control panel.
Engine is the main component responsible for generating power.
Alternator converts mechanical energy from the engine into electrical energy.
Fuel system supplies diesel fuel to the engine...read more
Q48. WHAT Is a machine how can use machine and it's Components and technical Parts of machine?
A machine is a device that uses energy to perform a specific task by utilizing various components and technical parts.
Machines consist of components such as gears, motors, sensors, and actuators.
They operate based on principles of physics and engineering.
Examples include cars, computers, and industrial robots.
Q49. Write a program to find number of bits in a number.
Program to find number of bits in a number
Use bitwise operations to count the number of bits in a number
Iterate through each bit and count the set bits
Use log base 2 to find the number of bits in a number
Interview Questions of Similar Designations
Top Interview Questions for Member Technical Staff Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month