Skip to content

haplesshero13/RecentlyUsedList-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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.

(Source: https://github.com/garora/TDD-Katas)

Interface

public class RecentlyUsedList {
    public init()
    public var size: Int { get }
    public subscript(index: Int) -> String { get }
    public func insert(_ element: String)
}

About

A Swift playground for the RecentlyUsedList kata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages