Member Technical Staff 1
Member Technical Staff 1 Interview Questions and Answers
Popular Companies
Q1. Valid parenthesis (all approaches ) time and space complexity and past projects.
Valid parenthesis time and space complexity and past projects
Approaches for checking valid parenthesis include using a stack or recursion
Time complexity for stack approach is O(n) and space complexity is O(n)
Time complexity for recursion approach is O(2^n) and space complexity is O(n)
Past projects may include developing algorithms for string manipulation or parsing
Q2. Find some of each level in a tree
To find some of each level in a tree, traverse the tree level by level and sum the values at each level.
Traverse the tree level by level using BFS (Breadth First Search)
At each level, sum the values of the nodes
Store the sum of each level in an array of strings
Q3. Find sum of digits using recursion
Recursively find the sum of digits in a given number
Create a recursive function that takes in a number as input
Base case: if the number is less than 10, return the number
Recursive case: return the last digit of the number added to the result of calling the function with the number divided by 10
Example: For input 123, the sum of digits would be 1 + 2 + 3 = 6
Q4. Longest increasing subsequence code
Find the longest increasing subsequence in an array
Use dynamic programming to solve this problem efficiently
Iterate through the array and keep track of the longest increasing subsequence ending at each index
The final answer will be the maximum value in the longest increasing subsequence array
Member Technical Staff 1 Jobs
Interview Questions of Similar Designations
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