8000 GitHub - agemcipe/coding-challenge: Coding challenge for technical interviews
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

agemcipe/coding-challenge

 
 

Repository files navigation

coding_challenge

Code style: black

Description

This is my Implementation to solve the Taktile Coding Challenge For reference the coding challenge is stated as:

Your challenge is to implement fold in the language of your choice. fold is a higher order function that takes

  • a sequence of type A
  • a "starting" value of type B
  • a function (A, B) -> B
5CE2

and returns a B. E.g., the sum of an array is a special case of fold, where

  • the sequence is an array of numbers
  • the starting value is 0
  • the function is +

You can find more information on Wikipedia.

Requirements

Create a conda environment to run this project in isolation (not needed but recommended).

conda env create -f environment.yml
conda activate coding_challenge 

Installation

pip install --editable .

Usage

from coding_challenge.main import fold

fold(iterable=[1,2,3], start=0, fn=lambda x,y: x+y)

Or check the tests/ for more examples of how to run the code

pytest -v tests/

About

Coding challenge for technical interviews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0