Embedded_SWE_Prep

I am not the creator of this list of problems. Credits to the original creator(s):

I am also linking the problems from Grind75(https://www.techinterviewhandbook.org/grind75?order=difficulty&grouping=topics&hours=40&weeks=3&difficulty=Easy&difficulty=Medium)

Note: The filter of the website is set to Easy and Medium problems (143 problems in all from this website itself)

Some problems from Grind 75 overlap with the ones that have been listed below. I have marked them as G75.

Linked list

  1. Determine if there is a cycle or not
  2. If there is a cycle, return the node where the cycle begins
  3. Find the node where two linked lists intersect
  4. Remove Nth node from end of the list
  5. Reverse linked list
  6. Remove linked list elements of a given value
  7. Group all odd nodes and even nodes together in order
  8. Palindrome linked list
  9. Merge two sorted linked lists
  10. Insert into a cyclic sorted linked list
  11. Rotate linked list by K places
  12. XOR linked list
  13. Reverse linked list in blocks of K

Arrays

  1. Find pivot index (where sum of numbers to left = sum of numbers to right)
  2. Diagonal traverse and print
  3. Spiral matrix
  4. Implement strstr()
  5. Two pointer technique - reverse string, array partition
  6. Two pointer - one fast runner, one slow runner - remove element in one scan, max consecutive 1's, minimum size subareay sum, rotate array
  7. Reverse words in a string - word by word, reverse within a word and maintain the order
  8. Remove duplicates from sorted array
  9. Move all zeroes to the end
  10. Max sub array sum - DP
  11. Find K closest elements to a given value

Hashmap

  1. 2 sum (return indices of 2 numbers such that they add up to a specific target) (G75)
  2. 4 sum
  3. Find all duplicates
  4. Intersection of 2 arrays
  5. Isomorphic strings
  6. First unique character in a string (one pass, two pass etc)
  7. Group anagrams
  8. Valid Sudoku
  9. Longest substring without repeating characters
  10. LRU cache (G75)
  11. Ransom Note (G75)
  12. Insert Delete GetRandom O(1) (G75)
  13. Design Hashmap

Stack

  1. Implement Stack using an Array
  2. Implement Stack using a Linked List
  3. Implement Queue using Stack (G75)
  4. Valid (Balanced) Parentheses (G75)
  5. Backspace String Compare (G75)
  6. Evaluate Reverse Polish Notation (G75)
  7. Min Stack (G75)
  8. Daily Temperature (G75)
  9. Decode String (G75)
  10. Asteroid Collision (G75)
  11. Basic Calculator II (G75)
  12. Trapping Rain Water (G75)

Queue

  1. Implement Queue using an Array
  2. Implement Queue using a Linked List
  3. Implement Stack using Queue
  4. Circular (Ring) buffer
  5. Design Hit Counter(G75)

Sorting

  1. Selection sort
  2. Bubble sort
  3. Insertion sort
  4. Merge sort
  5. Quick sort

Searching

  1. Linear search
  2. Binary search

Bit Manipulation

  1. Swap bits in odd and even positions
  2. Power of 2
  3. Set, clear and toggle i'th bit
  4. Find position of the only bit that is set
  5. Count no of set bits in logN time
  6. Add two nos without arithmetic operators(G75)
  7. Find the only no that appears once(G75)
  8. Set all bits in a given range
  9. Compute 2's complement
  10. Position of right most bit set
  11. Isolate the right most bit set
  12. Toggling right most bit set
  13. Position of left most bit set
  14. Swap 2 nos without using temporary variable
  15. Reverse the order of bits in a no
  16. Modify a bit at a given position to a 1 or a 0
  17. Missing Number(G75)
  18. Number of 1 bits(G75)
  19. Counting bits(G75)
  20. Find the duplicate number(G75)

Embedded specific

  1. Boot sequence
  2. Causes of segmentation fault and how to overcome it
  3. Differences between fault, abort and trap
  4. Compiler, assembler, linker, loader
  5. Volatile, pre processor, pragmas, const
  6. Fine grained vs coarse grained multithreading
  7. Virtual memory, paging, thread vs process
  8. Implement mutex using test and set, load linked and store conditional,
  9. Mutex vs semaphore
  10. Reader writer mutex
  11. Producer consumer
  12. Strict padding alignment
  13. Endianess - program to figure out the endianess, concert from big endian to little endian
  14. Implement memcpy, memmove, strstr, strcpy, atoi, malloc, free etc (all those standard library operations)
  15. Aligned malloc
  16. VIPT, TLBs , page faults
  17. Interrupts, exceptions, deadlocks, priroity inversion and inheritance
  18. HW breakpoint vs SW breakpoint
  19. SPI vs UART vs I2C
  20. Matrix multiplication, cache blocking, tiling, Gemm, rotation of matrices etc
  21. Bankers Algo, buddy system memory allocation, inverted paging
  22. Spinlocks, conditional variable
  23. Task scheduling, thrashing, cycle stealing, race conditions
  24. Queues, FIFO, Mailbox,
  25. Belady anomaly, philosopher dining problem
  26. Security : digital signing, hash, encryption
  27. Firmware update
  28. Unit testing vs integration testing
  29. RTOS vs bare metal
  30. HW timer : given HW timer, build an API to implemt a SW timer
  31. Function pointers and callbacks

C++

  1. New, delete
  2. OOPS theory - Abstraction, inheritance, polymorphism and encapsulation
  3. Inline
  4. Virtual functions, vptr and vtable
  5. Friend class and function
  6. Virtual base class, abstract class
  7. Function pointers
  8. Templates, template specialization, object slicing
  9. Deep vs shallow copy
  10. Copy constructors, constructor vs destructor
  11. Overloading vs overriding operations
  12. Different types of casting
  13. Static keyword, static fucntion
  14. Pointers vs references
  15. lvalue and rvalue
  16. Smart pointers