Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S system-design-primer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 173
    • Issues 173
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 190
    • Merge requests 190
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Donne Martin
  • system-design-primer
  • Merge requests
  • !156

Added circular array implementation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/sarathsp06/master into master Apr 10, 2018
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 4

Created by: sarathsp06

Added circular array with following features

Circular array Interface

  • [idx]
    • get item on idx ,assuming circular array
    • any idx value is taken as modulo of itself with size
    • negative idx is not permitted
  • len
    • length is always length of current valid entries
  • repr
    • the circular aray is printed with values in order
    • logical order is maintained not how it is stored
  • push
    • pushed item to end of queue
    • throws exception if capcity is filled , len == capcaity
  • pop
    • pop an item from start of array
    • throws exception if
  • capacity
    • returns initial size of array
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/sarathsp06/master