Skip to content

Commit

Permalink
Updating the README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyTiwari committed Apr 13, 2021
1 parent 2fa442d commit 896bbec
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# LRU-Cache

### Introduction
The <i>'Least Recently Used'</i> or simply the <i>LRU Cache Eviction Policy</i> is a widely used policy in the modern computer science world.
This repository provides an implementation of the LRU Cache using the <b>Linked List</b> and <b>Hashmap</b> approach. The <b>Space Complexity</b>
of the implementation is <b>O(n)</b> and the <b>time complexity</b> is <b>O(1)</b>.<br />

However, this repository also inculcates common <b>Corporate Software Development</b> practices in the code. A few are listed below:
- Code Versioning
- Modularization
- Error Handling
- Unit Testing
- Error Handling (Input Verification)
- Unit Testing* (Under Development)
- Logging
- Documentation

Note: The code aims to provide an introduction to the mentioned above topics and not an <i>overkill</i> implementation of the LRU Cache.

### Code Structure
The code in this repository is structured into modules. Here is a brief description on the code base:
- <b>LRU_Cache.py</b>: The main file to interact with the LRU Cache implementation logic.
- <b>Linked_List</b>: Folder containing the implementation of the Doubly Linked List used by the LRU Cache.
- <b>Helper</b>: Folder containing the implementation of common functions that can be shared across different modules.
- <b>Logger</b>: Folder containing the implementation of a wrapper over the standard Python logging module.

### Usage
All the modules can be run independently for testing and understanding purposes. If you are
using a text editors like Visual Studio Code or Pycharm, you can run the modules directly. To use the command line
for program execution, use the following command:

```python3 <filename>.py```

### References
- Linked List implementation in Python:
Expand Down

0 comments on commit 896bbec

Please sign in to comment.