Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

docnetwork/angular-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Fibonacci's Button

fib

The Fibonacci Sequence is an integer sequence commonly used in places where increasing sequences are needed, like login throttling or coding interview questions 😄. Formally it's defined as:

fib(n) = fib(n-1) + fib(n-2)

For this exercise we'll use the following base cases:

fib(0) = 0
fib(1) = 1

What do I do?

This is a simple test of basic CS fundamentals as well as basic Angular knowledge. The spec is as follows:

  • A single page that contains two buttons, Reset and Next Fib, as well as the current value of the sequence interpolated above it, starting at 0.
  • When the Next Fib button is clicked, we will update the view to display the next step of the sequence.
  • Clicking the Reset button will reset the sequence to the base case
  • The buttons and text should be styled similarly to the screenshot below: screen

For consideration:

  • Don't worry too much about dependency management. Including angular in a <script> tag is fine for this example.
  • Performance is important here. Make sure to watch how frequently you're evaluating a fib() function such that you're only running it as needed.
  • Update the last section of this README.md with any thoughts or explanations you may have.
  • You can choose to use recursion or iteration for your implementation, but please let us know why you chose the one you did in the README.

Extra Credit

  • Two Next Fib buttons, one that uses an iterative Fibonacci algorithm, and another that uses a recursive one, labeled appropriately.
  • Automated tests included for the project. Use your framework of choice for testing and include dependencies such that we can run the tests here.

Solution Discussion:

  • Your solution explanation goes here.

About

A small coding challenge to implement the fibonacci sequence in angular

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published