onsite
Round 1 - basic qns in synchronization primitives. given pthread APIs , need to synchronize two threads to print odd and even numbers respectively and only upto 10 and then exit.
Round 2 - The objective here is to populate an array of a given size in a 'snakelike' pattern up and down like so:
Given an empty array of 3x3, the array
█████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████
████████████████████████████
█████████████████████████████
███████████████████████████
█████████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████████