Advertisement
Guest User

Untitled

a guest
Apr 4th, 2023
1,659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | Software | 0 0
  1. 1st round - https://leetcode.com/discuss/interview-experience/3349963/Qualcomm-or-SDE-I-or-Bangalore-or-March-2023-or-Result-awaited
  2.  
  3. had a total of 5 rounds, last 4 rounds were conducted back to back on same day, overall 4 technical + 1 managerial
  4.  
  5. Don't remeber roundwise segregation, so just posting all of them here
  6.  
  7. - Was asked polymorphism in each and every round
  8. - Get `k` smallest elements from an array of `n` +ve integers, where `k << n` - told that I'll heapify the array and then pop out `k` times : `O(n) + O(k*logn)`
  9. - How would you , using a dice which has 1-6 marked on it and has a uniform probability of getting `1-6` when it's rolled, represent `1-7` , with uniform probability ? Also, you roll the dice as many times as you wish for getting the number (1-7) once.
  10. * Solution - think in terms of binary representation of numbers 1-7. They have 0s and 1s. Use the outcome of dice roll to represent 0 or 1 (assign any 3 numbers `0` and reamaining 3 `1`) After 3 consecutive rolls, you'll end up with anything from `000` to `111` which represent `0-7` but we only need `1-7` , so in case `0` turns up, just discard the rolls and start rolling again. Was able to arrive at tis approach after few hints.
  11. - Was shown 2 code snippets and asked if anything was wrong. In one of them we were ferring up allocated memory twice. Couldn't figure out what was wrong in the othe one.
  12. - A rectangular image was shown, which had a staright line dividing it into black and white parts.like this ![image](https://assets.leetcode.com/users/images/743355b4-56f1-49b6-b2c9-7d570101cd71_1680237936.018417.png)
  13. colors need need not be pitch black and absolute white, they can be in between, So now this image is represented ina 2d matrix having values from 0-255. I need to detect and return all the (x,y) coordinates of this image. This can be done by traversing the whoile image and checking if the difference between the surrounding cells exceed some threshold.
  14. - The 100 bulb puzzle - http://puzzles.nigelcoldwell.co.uk/six.htm , was aksed to first analyze logically the state of 100th bulb and then to code it.
  15. - The minimum no. of bytes that would be needed to store the result of multiplication of 2 ints, asssuming one int is 4 bytes (answer :8), proved it showing that the worst case result `(2^32 -1)^2` can't be stored in less than 8 bytes.
  16. - What is memory leak ? How can we avoid it ? (smart pointers: didn't know about these)
  17. - Declare an array, take a separate pointer `ptr` and point it to the 4th eleemnt in the array, what's the result of `ptr[-2]` ?
  18. - Tell me something in c++ which most people won't be aware of : explained abstract classes.
  19. - Is there anything you improved in your last company ?
  20. - Share an instance when you wokred really hard to achieve something.
  21. - What is the maximum inheritence level of code that you've ever worked with ? How would you comprehend codebases that have significant level of inheritence ?
  22.  
  23. These are all I can recall. Will update if I recall more questions.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement