You are building an in-memory, single-threaded analytics service for ChatGPT chat sessions. It ingests a real-time, globally non-decreasing stream of in…
An infected plant spreads infection to neighboring plants. If a plant is surrounded by D infected plants, it also becomes infected. How many days until…
Social Network Implement follow , unfollow , snapshot , and is_following . The snapshot captures the current state of all relationships and returns an i…
Credits Implement the Credits class, which should support the following operations: granting credits, subtracting credits, and getting the balance for a…
Given N free bytes in the memory, implement the following two functions. malloc(k) : allocates a block of k bytes of memory and returns a pointer to the…