• Stars
    star
    161
  • Rank 233,470 (Top 5 %)
  • Language
    JavaScript
  • Created about 10 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Just a bunch of algorithms using Javascript with ES6

Algorithms with ES6

This is just a lab to test how classic algorithms written in Ecmascript 6 would look like. The code result is incredible, because it resolves a lot of problems that we used to have while writting Javascript.

The list of Algorithms so far:

Math Expressions

Algorithm Description
factorial Factorial algorithm
fibonacci Fibonacci algorithm
greatestCommonDivisor Get the greatest common divisor of two numbers
isPrime Verify if is a prime number
permutation Permutation algorithm
simpleCombination Simple combination algorithm

Array functions

Algorithm Description
flatten Flatten an array
removeFromArr Remove an item from an array
reverse Reverse an array
removeDuplicates Remove duplicates item in array
concat Concatenate arrays
intersection Intersection between arrays
union Union between arrays

Interview Questions

Algorithm Description
givenSum Get two numbers in an array that the sum is equal a other number that is passed as second parameter
isPalindrome Return if word is a palindrome
reorderByIndexes Reorder an array based on other array with indexes
reverseStr Reverses a given string

You can see the compiled codes at here.

How to run

  1. Make sure to install all modules
$ npm install
  1. After making any changes, add your tests to __tests__ folder and run the test command
$ npm test
  1. To build from ES6 to ES5:
$ gulp build

Enjoy! 👻

More Repositories

1

react-adopt

😎 Compose render props components like a pro
TypeScript
1,681
star
2

reworm

🍫 the simplest way to manage state
TypeScript
1,464
star
3

micro-router

🚉 A tiny and functional router for Zeit's Micro
JavaScript
621
star
4

react-video

🎞 React component to load video from Vimeo or Youtube across any device.
JavaScript
273
star
5

react-simpletabs

Just a simple tabs component built with React
JavaScript
188
star
6

reicons

💅 Bundle your SVG into a fully customized React components
JavaScript
113
star
7

gatsby-starter-docz

📝 Gatsby starter with Docz and a blog for your documentation
JavaScript
90
star
8

frontend-styleguide

Keep your code clean, legible and beautiful!
CSS
69
star
9

spacefold

Use Pub/Sub pattern inside your React applications easily
TypeScript
61
star
10

oneoften

Tips, tricks, tutoriais and many things about "How building a Large Scale application with Javascript"
44
star
11

yarn-workspaces-example

Sample monorepo project using new Yarn feature called Workspaces
JavaScript
41
star
12

which-licenses-i-have

📝 Learn about the licenses around your package
JavaScript
29
star
13

docz-plugin-react-native

Plugin that allow you to use React Native with docz
JavaScript
21
star
14

storz

Global state machines in an easy way
TypeScript
21
star
15

shazam

⚡️ An opinionated and usefull react app management
JavaScript
17
star
16

hacker-news-es6

Hacker News feed built with ECMAScript 6 and jQuery
JavaScript
17
star
17

vitejs-boilerplate

ViteJS boilerplate with TailwindCSS, React Router v6, Typescript and more.
TypeScript
15
star
18

libundler

JavaScript
14
star
19

nextjs-boilerplate

NextJS boilerplate with some cool stack
TypeScript
12
star
20

promiseJS.br

Tradução do site http://www.promisejs.org/
CSS
11
star
21

certifyJS

NodeJS module that generate a course certificate in PDF
JavaScript
9
star
22

eleicoes2022

Estudos analítico encima dos dados do TSE sobre o resultado das Eleições 2022 no Brasil
7
star
23

notion-todo

Todo app made using the Notion API
JavaScript
6
star
24

xresource

TypeScript
6
star
25

reason-todo-example

Just a simple todo app built with ReasonML
OCaml
5
star
26

to-titlelize

NodeJS module to format string in titlelize
JavaScript
4
star
27

pedronauck.com

My website 🔥
JavaScript
3
star
28

jarvis

Central de conteúdo sobre desenvolvimento da GoNorth
2
star
29

builder-skeleton

Just a test for Stackblitz api
HTML
2
star
30

create-dataset

Experiment recreating React Context using plain Javascript
JavaScript
2
star
31

nvim

My current Neovim configuration
Lua
2
star
32

typescript-with-docz-example

Just a simple test
TypeScript
2
star
33

react-grocery-list

This is a sample Grocery List application to test ReactJS + Gulp + Browserify
JavaScript
2
star
34

xstate-fp

Just another approach to write state machines for XState
1
star
35

zmk-config

My zmk configuration
1
star
36

fusebox-preact-example

Sample application using FuseBox and Preact
JavaScript
1
star
37

docz-plugin-svgr

Use svgr as loader for svg images
TypeScript
1
star
38

teste-repo

Teste de repositório
1
star
39

datocms-blog-demo-5245

JavaScript
1
star
40

astronvim_config

Astro vim config
Lua
1
star
41

mediator

Mediator pattern applied on React
TypeScript
1
star
42

csb-xut4hw

HTML
1
star