Git Product home page Git Product logo

cp-lab3's Introduction

Limited Access Cache

  1. Реализуйте класс для работы с кэшем, поддерживающим конечное число обращений.
  2. Кэш хранит пары ключ-значение.
  3. Для каждого ключа известно число обращений, после которого кэш должен очиститься.
  4. После каждого обращения нужно уменьшить число обращений на 1.
  5. Если значения по ключу нет или если число обращений равно 0, то кэш веозвращает null
  6. Если пара ключ-значение задана без указания числа обращений, то число обращений равно 1.
  7. Нужна возможность получить статистику работы кэша в виде списка обращений: Ключ, Значение, Сколько осталось обращений.
  8. Разработку вести через TDD.

Limited Access Cache (Eng)

  1. Implement a class to work with a cache that supports a finite number of hits.
  2. The cache stores key-value pairs.
  3. For each key, the number of hits is known, after which the cache must be cleared.
  4. After each call, you need to reduce the number of hits by 1.
  5. If there is no value for the key or if the number of hits is 0, then the cache returns null
  6. If a key-value pair is set without specifying the number of hits, then the hit count is 1.
  7. You need the ability to get cache statistics in the form of a list of hits: Key, Value, How many hits left.
  8. Use TDD.

cp-lab3's People

Contributors

wolwer1ne avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.