Code Monkey home page Code Monkey logo

practice-for-week-05-dynamic-array-long-practice's Introduction

Implement a Dynamic Array

Clone the project from the starter.

Now that you've gone a bit deeper into understanding how arrays work in JavaScript, let's try to implement one on your own! Recall that the Array class includes the following:

  • Properties:
    • length
  • Methods:
    • read
    • push
    • pop
    • shift
    • unshift
    • indexOf
    • resize

For these exercises, you may not use any built-in JavaScript array methods.

You may use:

  • new Array(size) to create new storage arrays
  • arr[i] to read/write elements by index

You must call resize whenever the size of your array exceeds the capacity.

To run tests

  1. Clone the starter and navigate to dynamic-array
  2. npm install to install the test packages
  3. npm test to run tests
  4. Implement code in dynamic-array.js until all tests are green.

Tip: Reading test specs is key to understanding the problem.

Learning Goals

  • Identify the mechanics and complexity of adding and removing elements from an Array
  • Solve the memory equation to retrieve data from an array
  • Describe the resizing property of Dynamic Arrays and why it's needed
  • Implement a Stack data structure using an array
  • Select an Array or Stack when they are the appropriate tool for solving a problem

practice-for-week-05-dynamic-array-long-practice's People

Contributors

aa-assessment-project-manager[bot] 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.