Implement a function for determining the validity of a string. The string is valid if parentheses are correctly distributed within the string.
Engineer Interview Questions
933,739 engineer interview questions shared by candidates
Just leave a message here with the questions & I will post the solution in 5-10 minutes if I have got the same questions or I will write the solution if I know it. I got 3 coding problems to be done 90 minutes.
PHONE : 1. Pass by value/ pass by reference. Write a function to swap 2 variables - ll u use pass by value or reference ? 2. Do the same to swap 2 objects (how does it change) 2. Detect 11010 sequence with moore and mealy state machines. 3. Use of const ? What ll happen if you declare above 2 objects as const. 4. Explain NB assignment and blocking assignment. About event regions. 5. Fibonacci -- iterative solution and recursive solution. 6. Disadvantages of a recursive solution. 7. Output of this code fragment : reg a,b,c,d,w; assign w = a; initial begin a = 2; c=5; b<=c; a=5; end what is output of all registers. 8. Explain RISC pipeline. What is the problems. 9. Explain about uvm driver etc. ONSITE : round 1: Round Robin Arbiter Design round 2 : (1) Given a stack class implementation (LIFO) - there are 3 methods - push(), pop(), isempty(). Write a class using objects of given class to implement a FIFO. (2) Make best performance Implement the dist functionality in c++. Given a set of weights mimic to provide randomization skewed to the specification (Basically, write a function that would do something similar to a 'dist' in system verilog). round 3 : Given a divide by 3 state machine. Implement a divide by 5 statemachine. How many vectors are needed to verify it. So the circuit takes serial bit inputs and asserts if the number is a multiple of 3 or 5. round 4 : Circuits project. Basic pipeline architecture. Design a pipeline for a histogram processor. In every cycle we get an instruction (CLR, ADD INCR). Handle dependencies using bypass. round 5 : Given a producer and consumer. They are clocked with the same clock. Producer produces 80 writes for 100 clocks (no random). Consumer reads 8 times per 10 clocks. Find the FIFO depth. Write RTL and verify.
Write a function in language of your choice that takes in two strings, and returns true if they match. Constraints are as follows: String 1, the text to match to, will be alphabets and digits. String 2, the pattern, will be alphabets, digits, '.' and '*'. '.' means either alphabet or digit will be considered as a "match". "*" means the previous character is repeat 0 or more # of times. For example: Text: Facebook Pattern: F.cebo*k returns true
Given a m*n grid starting from (1, 1). At any point (x, y), you has two choices for the next move: 1) move to (x+y, y); 2) move to (x, y+x); From point (1, 1), how to move to (m, n) in least moves? (or there's no such a path)
# Question 3: # -- % Of sales that had a valid promotion, the VP of marketing # -- wants to know what % of transactions occur on either # -- the very first day or the very last day of a promotion campaign.
Given a wireless channel with loss rate 0.1, what's the throughput one can get with retransmission.
In a given sorted array of integers remove all the duplicates.
They gave me the below question to solve in 30 mins. Based on customer research, we know that our guests get confused when they are searching for accommodation and they found multiple hotels with the same name in the same city. To avoid this, we want to create a tool to identify "confusing" cities: cities with at least 3 hotels with the same name. Given a list of tuples (hotel_id, hotel_name, city) return a list of all "confusing" cities. Input: [ {hotel_1234, "Sheraton", "Amsterdam"} , {hotel_1000, "Sheraton", "Buenos Aires"} , {hotel_1001, "Hilton", "Amsterdam"} , {hotel_1002, "Royal Palace", "Bogota"} , {hotel_1003, "Hilton", "Amsterdam"} , {hotel_1004, "Sheraton", "Buenos Aires"} , {hotel_1005, "Sheraton", "Buenos Aires"} ] Output: [ "Buenos Aires" ]
Consider a stack of N number of cards which are piled up and in facing down. Each card has a unique number from the range 1 to N. The card is stacked in such a way that it exhibits the following behavior: Take the first card and put it under the stack without revealing. Now the next card on the top will have the number 1 on it. Next take 2 cards one after the other and put is under the stack without revealing. Yes you guessed it right - the next card on the top will reveal a value of 2. This goes on. Eg. for such a series : 9,1,8,5,2,4,7,6,3,10 [for N=10] Write a program to generate such a series for a given N number of cards so that this behavior can be exercised.
Viewing 291 - 300 interview questions