Skip to content

Solution #146 - Neha Amin - 16/07/2025 #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NEHA-AMIN
Copy link
Contributor

@NEHA-AMIN NEHA-AMIN commented Jul 16, 2025

This PR implements the LRU Cache using a HashMap and a custom Doubly Linked List.
It ensures O(1) time complexity for both get and put operations.
The cache evicts the least recently used item when capacity is exceeded.
All edge cases have been handled and tested using Leetcode test cases.

@NEHA-AMIN NEHA-AMIN changed the title Solution for LRU Cache #9- Solution for LRU Cache-Medium Jul 17, 2025
@NEHA-AMIN NEHA-AMIN changed the title #9- Solution for LRU Cache-Medium #9- LRU Cache-Medium Jul 17, 2025
@NEHA-AMIN NEHA-AMIN changed the title #9- LRU Cache-Medium Solution #146 - LRU Cache -Medium Jul 19, 2025
@NEHA-AMIN NEHA-AMIN force-pushed the feature/lru-cache branch from 3dd9552 to e66b15c Compare July 19, 2025 08:33
@NEHA-AMIN NEHA-AMIN changed the title Solution #146 - LRU Cache -Medium Solution #146 - Neha Amin - 16/07/2025 Jul 19, 2025
@NEHA-AMIN NEHA-AMIN force-pushed the feature/lru-cache branch from e66b15c to 0711fdf Compare July 19, 2025 08:35
Copy link
Member

@JRS296 JRS296 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem has been solved in Java. Kindly locate the problem and add it to this folder as well

Copy link
Member

@JRS296 JRS296 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem has been solved in Java, can you move the file into this folder?

@NEHA-AMIN NEHA-AMIN force-pushed the feature/lru-cache branch from 89e9782 to d98eb65 Compare July 21, 2025 06:04
@NEHA-AMIN
Copy link
Contributor Author

This problem has been solved in Java. Kindly locate the problem and add it to this folder as well

Thanks for reviewing my PRs ,
For Solution #146 - LRU cache I've checked and it hasn't been solved in Java , however I've added the Java solution as well .

@NEHA-AMIN NEHA-AMIN requested a review from JRS296 July 21, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants