{"id":20944372,"url":"https://github.com/amoshnin/r-recursion.tree.visualizer","last_synced_at":"2025-03-13T04:16:25.537Z","repository":{"id":106313674,"uuid":"402884423","full_name":"amoshnin/R-Recursion.Tree.Visualizer","owner":"amoshnin","description":"⚡️ Tool for visualizing generic recursive function written in JavaScript/Python. Functions are animated using tree structures. It aids identification of function time complexity \u0026 call stack depth","archived":false,"fork":false,"pushed_at":"2021-09-05T11:59:30.000Z","size":1811,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T21:37:23.541Z","etag":null,"topics":["algorithms","recursion","recursion-tree","recursion-visualizer","visualization"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/amoshnin.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,"governance":null}},"created_at":"2021-09-03T19:58:48.000Z","updated_at":"2024-05-09T10:05:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6124b37-0fd6-4252-9017-a4d8a2d0f166","html_url":"https://github.com/amoshnin/R-Recursion.Tree.Visualizer","commit_stats":null,"previous_names":["amoshnin/r-recursion.tree.visualizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoshnin%2FR-Recursion.Tree.Visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoshnin%2FR-Recursion.Tree.Visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoshnin%2FR-Recursion.Tree.Visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoshnin%2FR-Recursion.Tree.Visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amoshnin","download_url":"https://codeload.github.com/amoshnin/R-Recursion.Tree.Visualizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243335417,"owners_count":20274904,"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","recursion","recursion-tree","recursion-visualizer","visualization"],"created_at":"2024-11-18T23:40:42.570Z","updated_at":"2025-03-13T04:16:25.518Z","avatar_url":"https://github.com/amoshnin.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003eRecursion Tree Visualizer\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eTool for visualizing any generic recursive function written in JavaScript or Python.\u003c/p\u003e\n\n## Overview\n\nWatch the [demo video](https://youtu.be/VV9sbFn8IoY) on my [YouTube channel](https://www.youtube.com/channel/UC2Q2qLKUSXfPS_mxrtqvixA)\n\n\u003e Recursion is a concept that is best understood through visualization. This visualization tool written in TypeScript (with React and Node JS Express), will allow you to see visualization of different kinds of recursions. For simplicity, I chose to animate recursive functions using trees.\n\u003e\n\u003e Properties of the recursion tree visualizations are:\n\u003e\n\u003e - Each node represents a single recursive function call.\n\u003e - The height of the recursion tree is the depth of our function call stack (n).\n\u003e - The rate of change of the tree’s width represents the time complexity of our function (m):\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assets/recursion_tree.png\" height=\"300\"/\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\nImage taken from \u003ca href=\"https://quanticdev.com/algorithms/primitives/recursion-visualization/#resources\"\u003eQuanticDev blog post\u003c/a\u003e\n\u003c/div\u003e\n\n### Folders structure\n\n- `packages/web`: react user interface.\n- `packages/server`: server to execute user-defined code remotely.\n\u003c!-- - `packages/common`: shared code between web and lambda --\u003e\n\n## Local development\n\n### Web\n\nIn the `packages/web` directory, run:\n\n```bash\n# to install all dependencies\n$ npm install\n\n# to run the app on localhost\n$ npm run start\n```\n\n### Server\n\nIn the `packages/server` directory, run:\n\n```bash\n# to install all dependencies\n$ npm install\n\n# to run the app on localhost\n$ npm run serve\n```\n\n## Acknowledgements\n\nThanks to [Drawing Presentable Trees](https://llimllib.github.io/pymag-trees/#foot5) and [Improving Walker's Algorithm to Run in Linear Time](http://dirk.jivas.de/papers/buchheim02improving.pdf) articles I implemented Reingold-Tilford's algorithm to position each node of the tree on a 2D plane in an aesthetically pleasing way.\n\n## Compatibility\n\nFor a better experience, I recommend using a chromium-based browser like Chrome or Edge.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famoshnin%2Fr-recursion.tree.visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famoshnin%2Fr-recursion.tree.visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famoshnin%2Fr-recursion.tree.visualizer/lists"}