Skip to content

zenelhila/Data-Max-Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data Max Assignment

Exercise 1

Given a one-dimensional array, write a function that returns the length of the longest sequence of 1s. The array consists of integers, and it contains only 1s and 0s.

The function receives as input the array.

Example 1:

1 0 0 1 1 1 1

should return 4

Example 2:

1 0 0 0 1 0 1

should return 1

Example 3:

0 0 0 0 0 0 0

should return 0

Example 4:

0 1 1 1 1 1 1

should return 6

Example 5:

0 1 1 1 0 1 1

should return 3

Exercise 2

What are the differences between linked lists and arrays?

(Optional) Exercise 3

Write a function that returns the n-th fibonacci number. n is provided as input to the function

Releases

No releases published

Packages

No packages published

Languages