Filter interviews by
posted on 14 Apr 2017
I was interviewed in Feb 2017.
SPI and I2C are communication protocols used for connecting devices, while latch and FF are different types of sequential logic elements.
SPI (Serial Peripheral Interface) and I2C (Inter-Integrated Circuit) are both serial communication protocols used for connecting devices in embedded systems.
SPI uses separate lines for data input and output, while I2C uses a shared bus for both input and output.
SPI supports higher dat...
To find the average speed for the whole trip, we need to know the distance and the time taken for the trip.
Average speed = Total distance / Total time
If the distance and time for the trip are known, the average speed can be calculated.
If only the average speed while going is known, we cannot determine the speed of the whole trip without additional information.
The probability of getting heads maximum two times in a series of coin flips.
To calculate the probability, divide the number of favorable outcomes by the total number of possible outcomes.
In this case, the favorable outcomes are 0, 1, or 2 heads, and the total possible outcomes are 2^n, where n is the number of coin flips.
For example, if we flip a coin 3 times, the favorable outcomes are HHT, HTH, THH, HHH, TTH, THT, a...
Top trending discussions
I was interviewed in Jul 2017.
Code to print * in five consecutive lines
Use a loop to iterate five times
Inside the loop, print a string containing a single * character
Code to calculate number of bounces a ball goes through until it comes to rest.
Use a loop to simulate the bounces until the ball stops bouncing
Calculate the height of each bounce using the given formula
Keep track of the number of bounces in a counter variable
The best and less time consuming way to calculate factorial of a number is using iterative approach.
Iteratively multiply the number with all the numbers from 1 to the given number
Start with a result variable initialized to 1
Multiply the result with each number in the range
Return the final result
Code to find factorial using function recursion
Define a function that takes an integer as input
Check if the input is 0 or 1, return 1 in that case
Otherwise, call the function recursively with input-1 and multiply it with the input
posted on 10 May 2015
Locate sum of 2 numbers in a linear array (unsorted and sorted) and their complexities
For unsorted array, use nested loops to compare each element with every other element until the sum is found
For sorted array, use two pointers approach starting from the beginning and end of the array and move them towards each other until the sum is found
Complexity for unsorted array is O(n^2) and for sorted array is O(n)
Pointers are used to manipulate memory addresses and values in C++. Increment/decrement, address of and value at operators are commonly used.
Incrementing a pointer moves it to the next memory location of the same data type
Decrementing a pointer moves it to the previous memory location of the same data type
The address of operator (&) returns the memory address of a variable
The value at operator (*) returns the value sto
To determine if a point is inside or outside a rectangle, we check if the point's coordinates fall within the rectangle's boundaries.
Check if the point's x-coordinate is greater than the left edge of the rectangle
Check if the point's x-coordinate is less than the right edge of the rectangle
Check if the point's y-coordinate is greater than the top edge of the rectangle
Check if the point's y-coordinate is less than the b...
To find line that divides rectangle into 2 equal halves through a point inside it.
Find the center of the rectangle
Draw a line from the center to the given point
Extend the line to the opposite side of the rectangle
The extended line will divide the rectangle into 2 equal halves
There are multiple combinations of 8-bit and 16-bit signed numbers. How many such combinations are possible?
There are 2^8 (256) possible combinations of 8-bit signed numbers.
There are 2^16 (65,536) possible combinations of 16-bit signed numbers.
To find the total number of combinations, we can add the number of combinations of 8-bit and 16-bit signed numbers.
Therefore, the total number of possible combinations is 256 +
Find duplicates in an array of elements in 0(n) time and 0(1) space.
Use the property of inputs to your advantage
Iterate through the array and mark elements as negative
If an element is already negative, it is a duplicate
Return all the negative elements as duplicates
posted on 6 Apr 2022
I was interviewed before Apr 2021.
Round duration - 75 minutes
Round difficulty - Medium
This was an online coding round where I had 2 questions to solve under 75 minutes. Both the coding questions were of Medium to Hard level of difficulty.
Given two strings, S
and X
, your task is to find the smallest substring in S
that contains all the characters present in X
.
S = "abdd"
X = "bd"
Find the smallest substring in S that contains all characters in X.
Use a sliding window approach to find the smallest substring in S that contains all characters in X.
Keep track of the characters in X using a hashmap.
Move the window by adjusting the start and end pointers until all characters in X are found.
Return the smallest substring encountered.
Given a binary tree where each node contains an integer value, and a value 'K', your task is to find all the paths in the binary tree such that the sum of the node values in ...
Find all paths in a binary tree where the sum of node values equals a given value 'K'.
Traverse the binary tree using DFS and keep track of the current path and its sum.
At each node, check if the current sum equals 'K' and add the path to the result.
Continue traversal to the left and right child nodes recursively.
Return the list of paths that sum up to 'K'.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions of DS/Algo to solve under 60 minutes and 2 questions related to Operating Systems.
You are provided with a binary tree containing 'N' nodes. Your task is to determine if this tree is a Partial Binary Search Tree (BST). Return t...
Validate if a binary tree is a Partial Binary Search Tree (BST) by checking if each node's left subtree contains nodes with data less than or equal to the node's data, and each node's right subtree contains nodes with data greater than or equal to the node's data.
Check if each node's left subtree follows BST property (data <= node's data) and right subtree follows BST property (data >= node's data)
Recursively che...
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to solve this problem efficiently.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the array as the result.
Processes are instances of a program in execution, while threads are lightweight processes within a process.
A process is a program in execution, with its own memory space and resources.
Threads are lightweight processes within a process, sharing the same memory space and resources.
Processes are independent of each other, while threads within the same process can communicate and share data.
Example: A web browser running ...
Different types of semaphores include binary semaphores, counting semaphores, and mutex semaphores.
Binary semaphores: Can only have two states - 0 or 1. Used for mutual exclusion.
Counting semaphores: Can have multiple states. Used for managing resources with limited capacity.
Mutex semaphores: Similar to binary semaphores but with additional features like priority inheritance.
Named semaphores: Can be shared between proc...
Round duration - 60 Minutes
Round difficulty - Hard
In this round, I was asked 3 coding questions out of which I had to implement the first two and for the last question I was only asked the optimal approach. The main challenge in this round was to implement the first two questions in a production ready manner without any bugs and so I had to spent some time thinking about some Edge Cases which were important with respect to the question.
You are given an array arr
of length N
. For each element in the array, find the next greater element (NGE) that appears to the right. If there is no such greater ele...
The task is to find the next greater element for each element in an array to its right, if no greater element exists, return -1.
Use a stack to keep track of elements for which the next greater element is not found yet.
Iterate through the array from right to left and pop elements from the stack until a greater element is found.
Store the next greater element for each element in a separate array.
If the stack is empty afte...
Given a sorted array of 'N' integers, your task is to generate the power set for this array. Each subset of this power set should be individually sorted.
A power set of a set 'ARR' i...
Generate power set of a sorted array of integers with individually sorted subsets.
Use recursion to generate all possible subsets by including or excluding each element in the array.
Sort each subset before adding it to the power set.
Handle base case when all elements have been considered to add the subset to the power set.
Ninja is learning about sorting algorithms, specifically those that do not rely on comparisons. Can you help Ninja implement the counting sort algorithm?
Implement counting sort algorithm to sort an array of integers without comparisons.
Count the frequency of each element in the input array.
Create a prefix sum array to determine the position of each element in the sorted array.
Iterate through the input array and place each element in its correct position based on the prefix sum array.
Time complexity of counting sort is O(n+k), where n is the number of elements and k is
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Some old coding platform with limited testcases
2 coding questions, aptitude and electronics
posted on 6 Mar 2024
posted on 11 Jun 2022
I applied via LinkedIn and was interviewed in Dec 2021. There was 1 interview round.
Mcq questions , c++ java basic aptitube
I applied via Campus Placement and was interviewed in May 2024. There were 2 interview rounds.
2 hours and conducted online.
Some of the top questions asked at the Mentor Graphics Functional Verification Engineer/ Team Lead Verification interview -
Senior Member of Technical Staff
70
salaries
| ₹0 L/yr - ₹0 L/yr |
Lead Member Technical Staff
43
salaries
| ₹0 L/yr - ₹0 L/yr |
Member Consulting Staff
35
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
29
salaries
| ₹0 L/yr - ₹0 L/yr |
Member Technical Staff
25
salaries
| ₹0 L/yr - ₹0 L/yr |
Cadence Design Systems
Synopsys
Ansys Software Private Limited
Autodesk