Code Monkey home page Code Monkey logo

recently-used-05's Introduction

Copied from https://github.com/garora/TDD-Katas

Recently Used List

Develop a recently-used-list class to hold strings uniquely in Last-In-First-Out order.

The most recently added item is first, the least recently added item is last.

Items can be looked up by index, which counts from zero.

Items in the list are unique, so duplicate insertions are moved rather than added.

A recently-used-list is initially empty.

Optional extras:

Null insertions (empty strings) are not allowed.

A bounded capacity can be specified, so there is an upper limit to the number of items contained, with the least recently added items dropped on overflow.

See a video tutorial showing how to solve this kata in Python.

More tests:

While getting items by index, supplied index-value should be within the bounds of List [eg. if maximum item counts of list is 5 then supplied index is less than 4 as index starts from 0 (zero)] Negative index value not allowed [>0] Size limit is must if not supplied make 5 as default [0-4] List can be non-sizable means without upper limit list can be created [Hint-try property or constructor initializers]

recently-used-05's People

Watchers

James Cloos avatar  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.