{"id":16464157,"url":"https://github.com/naufal-yafi/solve-code-hackerrank","last_synced_at":"2026-06-07T22:34:16.934Z","repository":{"id":156083394,"uuid":"594593403","full_name":"naufal-yafi/solve-code-hackerrank","owner":"naufal-yafi","description":"Push Rank","archived":false,"fork":false,"pushed_at":"2023-01-30T02:53:04.000Z","size":143,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T15:39:28.560Z","etag":null,"topics":["algorithm-challenges","algorithms","challenge","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naufal-yafi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-29T02:38:20.000Z","updated_at":"2023-01-29T05:03:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"55790a6a-bfff-4ed1-82d2-09a59012b6f1","html_url":"https://github.com/naufal-yafi/solve-code-hackerrank","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naufal-yafi/solve-code-hackerrank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufal-yafi%2Fsolve-code-hackerrank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufal-yafi%2Fsolve-code-hackerrank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufal-yafi%2Fsolve-code-hackerrank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufal-yafi%2Fsolve-code-hackerrank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naufal-yafi","download_url":"https://codeload.github.com/naufal-yafi/solve-code-hackerrank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naufal-yafi%2Fsolve-code-hackerrank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34041087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["algorithm-challenges","algorithms","challenge","javascript"],"created_at":"2024-10-11T11:26:18.820Z","updated_at":"2026-06-07T22:34:16.914Z","avatar_url":"https://github.com/naufal-yafi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![contributor](https://img.shields.io/github/contributors/naufal-yafi/solve-code-hackerrank?color=red) ![size](https://img.shields.io/github/repo-size/naufal-yafi/solve-code-hackerrank) ![commit](https://img.shields.io/github/last-commit/naufal-yafi/solve-code-hackerrank)\n\n\u003ch2\u003e🧑‍💻HackerRank\u003c/h2\u003e\n\n\u003cp\u003eThis repo I use to store the code - the code I've already completed. Not only learning the algorithms that \u003cstrong\u003e\u003ca href=\"https://www.hackerrank.com/\"\u003eHackerRank\u003c/a\u003e\u003c/strong\u003e has provided but also learning to use \u003cstrong\u003e\u003ca href=\"https://www.geeksforgeeks.org/unit-testing-software-testing/\"\u003eunit testing\u003c/a\u003e\u003c/strong\u003e from the javascript library, namely \u003cstrong\u003e\u003ca href=\"https://jestjs.io/\"\u003eJest\u003c/a\u003e\u003c/strong\u003e. And I'm also using the \u003cstrong\u003e\u003ca href=\"https://babeljs.io/\"\u003eBabel\u003c/a\u003e\u003c/strong\u003e library because \u003cstrong\u003e\u003ca href=\"https://jestjs.io/\"\u003eJest\u003c/a\u003e\u003c/strong\u003e doesn't support \u003ci\u003e\u003ca href=\"https://robertmarshall.dev/blog/es6-modules-a-beginners-guide/#:~:text=ES6%20modules%20are%20JavaScript%20modules%20that%20are%20used,or%20primitive%20values%20from%20one%20file%20to%20another.\"\u003eES6 Modules\u003c/a\u003e\u003c/i\u003e yet so it should be compiled into \u003ci\u003e\u003ca href=\"https://medium.com/@cgcrutch18/commonjs-what-why-and-how-64ed9f31aa46\"\u003eCommonJS\u003c/a\u003e\u003c/i\u003e.\u003c/p\u003e\n\n\u003ch5\u003e⚠️ Previously installed the required dependesy by using the command ⚠️\u003c/h5\u003e\n\n```sh\nnpm i\n```\n\n\u003ch5\u003eHow to Use: \u003c/h5\u003e\n\nYou can run the `npm test` command to run all tests. If you want to run a specific test, you can use `npm run test-nameFile`. I've written it in \u003cstrong\u003e\u003ca href=\"https://github.com/naufal-yafi/solve-code-hackerrank/blob/main/package.json\"\u003epackage.json\u003c/a\u003e\u003c/strong\u003e.\n\n```json\n\"scripts\": {\n    \"test\": \"jest\",\n    \"test-solved-me-first\": \"npx jest --runTestsByPath .solved-codesolved-me-first/solve-me-first.test.js\",\n    \"test-simple-array-sum\": \"npx jest --runTestsByPath .solved-codesimple-array-sum/simple-array-sum.test.js\",\n    \"test-compare-the-triplets\": \"npx jest --runTestsByPath .solved-codecompare-the-triplets/compare-the-triplets.test.js\",\n    ......\n```\n\n\u003ch5\u003eExample:\u003c/h5\u003e\n\n```sh\n$ npm run test-diagonal-difference\n```\n\n\u003ch5\u003eOutput:\u003c/h5\u003e\n\n```sh\n$ npm run test-diagonal-difference\n\n\u003e solve-code-hackerrank@1.0.0 test-diagonal-difference\n\u003e npx jest --runTestsByPath ./solved-code/diagonal-difference/diagonal-difference.test.js\n\n PASS  solved-code/diagonal-difference/diagonal-difference.test.js\n  √ test case 0 (2 ms)\n  √ test case 1 (1 ms)\n  √ test case 2 (1 ms)\n  √ test case 3 (1 ms)\n  √ test case 4\n  √ test case 5 (1 ms)\n  √ test case 6 (1 ms)\n  √ test case 7 (7 ms)\n  √ test case 8 (5 ms)\n  √ test case 9 (9 ms)\n  √ test case 10 (18 ms)\n\nTest Suites: 1 passed, 1 total\nTests:       11 passed, 11 total\nSnapshots:   0 total\nTime:        0.886 s, estimated 4 s\nRan all test suites within paths \"./solved-code/diagonal-difference/diagonal-difference.test.js\".\n```\n\n\u003ch5\u003eOutput Run All Tests: \u003c/h5\u003e\n\n```sh\n$ npm test\n\n\u003e solve-code-hackerrank@1.0.0 test\n\u003e jest\n\n PASS  solved-code/solved-me-first/solve-me-first.test.js\n  √ test case 0 (21 ms)\n  √ test case 1 (1 ms)\n\n PASS  solved-code/a-very-big-sum/a-very-big-sum.test.js\n  √ test case 0 (22 ms)\n\n PASS  test/test-index.test.js\n  √ testing (7 ms)\n\n PASS  solved-code/simple-array-sum/simple-array-sum.test.js\n  √ test case 0 (17 ms)\n\n PASS  solved-code/compare-the-triplets/compare-the-triplets.test.js\n  √ test case 0 (4 ms)\n  √ test case 1 (1 ms)\n\n PASS  solved-code/diagonal-difference/diagonal-difference.test.js\n  √ test case 0 (8 ms)\n  √ test case 1 (1 ms)\n  √ test case 2\n  √ test case 3\n  √ test case 4\n  √ test case 5 (1 ms)\n  √ test case 6 (2 ms)\n  √ test case 7 (9 ms)\n  √ test case 8 (3 ms)\n  √ test case 9 (10 ms)\n  √ test case 10 (8 ms)\n\nTest Suites: 6 passed, 6 total\nTests:       18 passed, 18 total\nSnapshots:   0 total\nTime:        3.715 s, estimated 4 s\nRan all test suites.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaufal-yafi%2Fsolve-code-hackerrank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaufal-yafi%2Fsolve-code-hackerrank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaufal-yafi%2Fsolve-code-hackerrank/lists"}