Freecharge | Senior SDE | Online Round | 21 August 2024 [Result :Passed ]
Summary
I successfully cleared the first online interview round for a Senior SDE position at Freecharge, where I tackled two standard LeetCode problems and discussed various technical theory topics.
Full Experience
I recently completed the initial online interview round for a Senior SDE role at Freecharge. The round primarily focused on problem-solving, where I was presented with two well-known LeetCode challenges: LRU Cache (LeetCode 146) and Sliding Window Maximum (LeetCode 239). Additionally, the interviewer delved into my theoretical knowledge, asking questions related to AWS, Java, multithreading, and Spring Boot.
Interview Questions (2)
Design and implement a data structure for a Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key): Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1. put(key, value): Set or insert the value if the key is not already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item. The operations should run in O(1) average time complexity.
You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the max sliding window. All operations should be in O(N) time complexity.