{"id":16594066,"url":"https://github.com/atilafassina/fundamentals","last_synced_at":"2025-04-04T23:22:33.125Z","repository":{"id":36799475,"uuid":"149247409","full_name":"atilafassina/fundamentals","owner":"atilafassina","description":"🎓Computer Science fundamentals in JavaScript.","archived":false,"fork":false,"pushed_at":"2023-01-04T16:19:20.000Z","size":487,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T12:54:38.490Z","etag":null,"topics":["algorithms","computer-science-algorithms","study-project"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atilafassina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-18T07:36:03.000Z","updated_at":"2021-08-15T19:44:00.000Z","dependencies_parsed_at":"2023-01-17T04:54:14.131Z","dependency_job_id":null,"html_url":"https://github.com/atilafassina/fundamentals","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atilafassina%2Ffundamentals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atilafassina%2Ffundamentals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atilafassina%2Ffundamentals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atilafassina%2Ffundamentals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atilafassina","download_url":"https://codeload.github.com/atilafassina/fundamentals/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247262765,"owners_count":20910303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","computer-science-algorithms","study-project"],"created_at":"2024-10-11T23:44:59.450Z","updated_at":"2025-04-04T23:22:33.103Z","avatar_url":"https://github.com/atilafassina.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cspan\u003e⭐ 🏈 🦄 🏀 🤘 🏉 ✨\u003c/span\u003e\n  \u003ch1\u003eFUNdamentals\u003c/h1\u003e\n  \u003ca href=\"https://travis-ci.org/atilafassina/fundamentals\" alt=\"Travis-CI build badge\"\u003e\u003cimg src=\"https://api.travis-ci.org/atilafassina/fundamentals.svg?branch=master\" /\u003e\u003c/a\u003e\n  \u003cp\u003eComputer Science fundamentals in JavaScript.\u003c/p\u003e\n  \u003cp\u003eCheck below for recommended use-cases on each of them and relevant tradeoffs.\u003c/p\u003e\n\u003c/div\u003e\n\n## Algorithms\n\n### Binary Search\n\nRequires a sorted `array` for it to work. Essentially a Binary Search break the array into 2 halves and check in which half range the target value may be. It's quite powerful for large data sets as it can avoid iterations, one can (should) perform a Binary Search knowing only two things: that the provided `array` is sorted (1), and the length of the given `array`(2).\n\n[Implementation](https://github.com/atilafassina/fundamentals/tree/master/src/binarySearch)\n\n### Insertion Sort\n\nIt‘s a simple to implement sort algorithm, not very efficient for large data sets, but quite efficiente and powerful for small ones. It can avoid confusion by not changing the order of equal set of keys. In a nutshell, Insertion Sort iterates twice through the `array`. First iteration corresponds to the target position, whilst second iteration is for comparison with future elements. Every time the current item is smaller than the comparison value, it is inserted in the current position and first iteration moves forward.\n\n[Implementation](https://github.com/atilafassina/fundamentals/tree/master/src/insertionSort)\n\n---\n\nHeavily inspired on [Algorithms.JS](http://felipernb.github.io/algorithms.js/) by Felipe Ribeiro.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatilafassina%2Ffundamentals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatilafassina%2Ffundamentals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatilafassina%2Ffundamentals/lists"}