Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/etiennemarais/code_katas
This repo contains exercises and katas I use to stay in shape.
https://github.com/etiennemarais/code_katas
Last synced: about 5 hours ago
JSON representation
This repo contains exercises and katas I use to stay in shape.
- Host: GitHub
- URL: https://github.com/etiennemarais/code_katas
- Owner: etiennemarais
- Created: 2015-06-19T10:04:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-08T09:08:04.000Z (almost 9 years ago)
- Last Synced: 2023-12-17T03:41:56.765Z (11 months ago)
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# code_katas
This repo contains exercises and katas I use to stay in shape.I will continue to keep adding katas that I have done to this repo, and hoppefully they will start changing from PHP to other languages as I continue to learn.
# Non Decreasing sub sequences Kata
## Problem StatementImplement a function that, given a sequence of numbers such as:
[ 3,6,61,6,7,9,1,7,7,2,7,7,2,388,3,72,7 ]
... will identify and return each contiguous sub-sequence of non-decreasing numbers. E.g. this example input should return this array-of-arrays (e.g. or list-of-lists)
[ [3,6,61],[6,7,9],[1,7,7],[2,7,7],[2,388],[3,72],[7] ]
### Edge CasesYou will rarely get valid input from users, What do you do with invalid or emtpy values?
### TestsIncluded in this package is PHPUnit and PHPSpec, you may choose any of the two.