Member Technical Staff

filter-iconFilter interviews by

30+ Member Technical Staff Interview Questions and Answers for Freshers

Updated 19 Dec 2024

Popular Companies

search-icon

Q1. 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

Ans.

Find the next smallest palindrome greater than a given number represented as a string.

  • Iterate from the middle of the number and mirror the left side to the right side to create a palindrome

  • If the resulting palindrome is greater than the input number, return it

  • Handle cases where the number has all 9s and requires a carry over to the left side

Q2. 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

Ans.

The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.

  • Iterate through the array of stock prices to find the maximum profit that can be achieved by buying and selling stocks at different points.

  • Keep track of the maximum profit that can be achieved by considering all possible combinations of buy and sell transactions.

  • Ensure that you sell the stock before buying again to adhere to the con...read more

Frequently asked in,

Q3. 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

Ans.

Check if two strings are anagrams of each other by comparing their characters.

  • Create a character frequency map for both strings and compare them.

  • Sort both strings and compare if they are equal.

  • Use a hash set to store characters from one string and remove them while iterating through the other string.

  • Check if the character counts of both strings are equal.

  • Example: For input 'listen' and 'silent', the output should be true.

Q4. 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
Ans.

The problem involves finding the optimal strategy to accumulate the maximum amount in a coin game with specific rules.

  • Start by considering the base cases where there are only 1 or 2 coins.

  • Use dynamic programming to keep track of the maximum amount that can be won at each step.

  • Consider the different scenarios when choosing a coin from either end of the line.

  • Keep track of the total winnings for both players and choose the optimal strategy to maximize your winnings.

  • Implement a r...read more

Are these interview questions helpful?

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

Ans.

The longest happy string problem involves constructing a string with 'a', 'b', and 'c' without having any three consecutive letters being the same.

  • Determine the maximum number of times 'a', 'b', and 'c' can appear in the string based on the given input values.

  • Construct the longest happy string by alternating between 'a', 'b', and 'c' while respecting the constraints.

  • Return '1' if a correct happy string can be formed, otherwise return '0'.

Q6. 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
Ans.

The task is to return the spiral path of elements in a given matrix.

  • Iterate through the matrix in a spiral path by keeping track of boundaries.

  • Print elements in the order of top row, right column, bottom row, and left column.

  • Continue the spiral path until all elements are printed.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. 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

Ans.

Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.

  • Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.

  • If the two pointers meet at any point, there is a cycle in the linked list.

  • Use Floyd's Cycle Detection Algorithm for efficient detection of cycles in linked lists.

Frequently asked in,
Q8. Which data structure would you use to implement the undo and redo operation in a system?
Ans.

Use a stack data structure for implementing undo and redo operations.

  • Stack data structure is ideal for implementing undo and redo operations as it follows Last In First Out (LIFO) principle.

  • Push the state of the system onto the stack when an action is performed, allowing for easy undo by popping the top element.

  • Redo operation can be implemented by keeping a separate stack for redo actions.

  • Example: In a text editor, each change in text can be pushed onto the stack for undo and...read more

Member Technical Staff Jobs

Member of Technical Staff - UI 3-5 years
Oracle India Pvt. Ltd.
3.7
Kolkata
Member of Technical Staff LLM/AI - MTS 2-4 years
Athenahealth India
4.2
Chennai
Member Technical Staff 3-5 years
Oracle India Pvt. Ltd.
3.7
Bangalore / Bengaluru

Q9. 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

Ans.

The minimum number of swaps required to sort an array of distinct elements in ascending order.

  • Use a hashmap to store the index of each element in the array.

  • Iterate through the array and swap elements to their correct positions.

  • Count the number of swaps needed to sort the array.

Q10. 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

Ans.

Move all zeroes in an unsorted array to the end while preserving the order of non-zero elements.

  • Iterate through the array and maintain two pointers - one for the current position and one for the position to swap with.

  • If the current element is non-zero, swap it with the element at the swap pointer and increment the swap pointer.

  • After iterating through the array, fill the remaining positions with zeroes.

  • Example: Input: [0, 1, -2, 3, 4, 0, 5, -27, 9, 0], Output: [1, -2, 3, 4, 5,...read more

Q11. 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

Q12. Can you design the bank architecture using basic OOP concepts in any programming language?
Ans.

Yes, I can design the bank architecture using basic OOP concepts in any programming language.

  • Create classes for entities like Bank, Account, Customer, Transaction, etc.

  • Use inheritance to model relationships between entities (e.g. SavingsAccount and CheckingAccount inheriting from Account).

  • Implement encapsulation to hide internal details of classes and provide public interfaces for interaction.

  • Utilize polymorphism to allow different classes to be treated as instances of a comm...read more

Q13. 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

Q14. 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.

Q15. 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

Q16. 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

Q17. 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.

Q18. 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

Q19. 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

Q20. A horse is bind to corner of square of 5 cm with a rope of 15m.Calculate the grazing area.

Ans.

The grazing area of the horse can be calculated by finding the area of the circle formed by the rope.

  • Calculate the radius of the circle formed by the rope (15m).

  • Use the formula for the area of a circle (A = πr^2) to find the grazing area.

  • Subtract the area of the square (5cm x 5cm) from the grazing area to get the final result.

Q21. Which is greater 1+√2 or √5 .draw graphically

Ans.

1+√2 is greater than √5 graphically.

  • Plot the points on a number line or graph.

  • 1+√2 is approximately 2.41, while √5 is approximately 2.24.

  • Therefore, 1+√2 is greater than √5.

Q22. Develop and implement security and cloud controls for Cloud Engineering

Ans.

Develop and implement security and cloud controls for Cloud Engineering

  • Conduct a thorough risk assessment to identify potential security threats

  • Implement encryption protocols to protect data in transit and at rest

  • Utilize multi-factor authentication to enhance access control

  • Regularly monitor and audit cloud infrastructure for security vulnerabilities

  • Implement automated security controls to quickly respond to threats

  • Train employees on security best practices to prevent human er...read more

Q23. Maximum number of distinct elements in every sliding window of size k

Ans.

Find maximum distinct elements in every sliding window of size k.

  • Create a hash table to store the frequency of each element in the current window.

  • Use two pointers to maintain the current window and slide it over the array.

  • Update the hash table for each new element in the window and remove the old element.

  • Keep track of the maximum number of distinct elements seen so far.

  • Repeat until all windows of size k have been processed.

Q24. 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

Q25. 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.

Q26. New opportunities to grow in Cloud

Ans.

Cloud offers endless opportunities for growth through continuous innovation and scalability.

  • Continuous learning and upskilling in cloud technologies such as AWS, Azure, and Google Cloud

  • Exploring new services and features offered by cloud providers to enhance productivity and efficiency

  • Utilizing cloud-native tools for automation, monitoring, and optimization

  • Developing expertise in areas like serverless computing, containers, and microservices architecture

  • Collaborating with cro...read more

Q27. Minimum Swaps to make it palindrome

Ans.

Minimum number of swaps required to make a given array of strings a palindrome.

  • Create a hash table to store the frequency of each character in the array.

  • Iterate through the array and count the number of characters with odd frequency.

  • If the count is greater than 1, the array cannot be rearranged into a palindrome.

  • Otherwise, use two pointers to swap characters and count the number of swaps required to make the array a palindrome.

Q28. Coding in machine with complex problemns

Ans.

Coding in machine with complex problems requires strong problem-solving skills and knowledge of algorithms.

  • Understand the problem thoroughly before starting to code

  • Break down the problem into smaller subproblems

  • Use appropriate data structures and algorithms to solve the problem efficiently

  • Test your code thoroughly to ensure it works correctly

  • Optimize your code for performance if necessary

Q29. 4th smallest element in BST

Ans.

Find the 4th smallest element in a Binary Search Tree.

  • Traverse the BST in-order and keep track of the count of visited nodes.

  • When the count reaches 4, return the current node's value.

  • If the BST has less than 4 nodes, return null or throw an exception.

Q30. Approvals from VP and CTO

Ans.

Approvals from VP and CTO are required for certain decisions or actions within the company.

  • Approvals from VP and CTO are usually needed for major projects, budget allocations, strategic decisions, etc.

  • These approvals ensure that decisions align with the company's goals and strategies.

  • Examples include seeking approval from the VP and CTO before launching a new product, making significant changes to existing processes, or hiring key personnel.

Q31. Java program on data structures

Ans.

Java program on data structures

  • Use Java to implement common data structures like arrays, linked lists, stacks, queues, trees, and graphs

  • Practice implementing algorithms like sorting, searching, and traversal on these data structures

  • Understand the time and space complexity of different operations on data structures

Q32. Merge two sorted linked lists

Ans.

Merge two sorted linked lists

  • Create a new linked list to store the merged list

  • Compare the first nodes of both lists and add the smaller one to the new list

  • Move the pointer of the added node to the next node

  • Repeat until one of the lists is empty

  • Add the remaining nodes of the non-empty list to the new list

Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.5
 • 3.8k Interviews
3.7
 • 848 Interviews
4.3
 • 505 Interviews
3.9
 • 234 Interviews
4.4
 • 145 Interviews
3.7
 • 75 Interviews
View all

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

Recently Viewed
SALARIES
Amazon Sellers Services
SALARIES
Amazon Sellers Services
COMPANY BENEFITS
AU Small Finance Bank
No Benefits
INTERVIEWS
Amazon Sellers Services
No Interviews
SALARIES
Amazon Sellers Services
SALARIES
Amazon Sellers Services
DESIGNATION
INTERVIEWS
Amazon Sellers Services
No Interviews
SALARIES
Alacriti Infosystems
SALARIES
Amazon Sellers Services
Member Technical Staff Interview Questions
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
65 L+

Reviews

4 L+

Interviews

4 Cr+

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