All Projects → brpapa → Recursion Tree Visualizer

brpapa / Recursion Tree Visualizer

Licence: mit
🌳 Input the javascript code of any recursive function and visualize your recursion tree

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Recursion Tree Visualizer

Meta Typing
📚 Functions and algorithms implemented purely with TypeScript's type system
Stars: ✭ 628 (+217.17%)
Mutual labels:  recursion
Cs Fundamentals
The CS Fundamentals Series
Stars: ✭ 76 (-61.62%)
Mutual labels:  recursion
Dsa Geeksclasses
DSA-Self Paced With Doubt Assistance Course Solutions in Python (Python 3)
Stars: ✭ 137 (-30.81%)
Mutual labels:  recursion
J8plus
Library containing useful tools for Java 8
Stars: ✭ 23 (-88.38%)
Mutual labels:  recursion
Recursion schemes
Recursion schemes for Idris
Stars: ✭ 61 (-69.19%)
Mutual labels:  recursion
Glom
☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️
Stars: ✭ 1,341 (+577.27%)
Mutual labels:  recursion
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+2142.93%)
Mutual labels:  recursion
Algo Tree
Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.
Stars: ✭ 166 (-16.16%)
Mutual labels:  recursion
Coding Ninjas Data Structures And Algorithms In Python
Solved problems and assignments of DSA course taught by Coding Ninjas team
Stars: ✭ 70 (-64.65%)
Mutual labels:  recursion
Data Structures
Data-Structures using C++.
Stars: ✭ 121 (-38.89%)
Mutual labels:  recursion
Sudoku Generator
A Sudoku puzzle generator written in C++ using modified and efficient backtracking algorithm.
Stars: ✭ 33 (-83.33%)
Mutual labels:  recursion
Sopgi
A small VEX raytracer for SideFX Houdini with photon mapping global illumination and full recursive reflections and refractions
Stars: ✭ 55 (-72.22%)
Mutual labels:  recursion
Project Euler Solutions
Runnable code for solving Project Euler problems in Java, Python, Mathematica, Haskell.
Stars: ✭ 1,374 (+593.94%)
Mutual labels:  recursion
Cloak
A mini-preprocessor library to demostrate the recursive capabilites of the preprocessor
Stars: ✭ 709 (+258.08%)
Mutual labels:  recursion
Typelang
🌳 A tiny language interpreter implemented purely in TypeScript's type-system
Stars: ✭ 149 (-24.75%)
Mutual labels:  recursion
You Dont Need Loops
Avoid The One-off Problem, Infinite Loops, Statefulness and Hidden intent.
Stars: ✭ 599 (+202.53%)
Mutual labels:  recursion
Fs extra
Expanding opportunities standard library std::fs and std::io
Stars: ✭ 95 (-52.02%)
Mutual labels:  recursion
Leetcode
High-quality LeetCode solutions
Stars: ✭ 178 (-10.1%)
Mutual labels:  recursion
Dynamics
A Compositional Object-Based Approach to Learning Physical Dynamics
Stars: ✭ 159 (-19.7%)
Mutual labels:  recursion
Atto
An insanely simple self-hosted functional programming language
Stars: ✭ 119 (-39.9%)
Mutual labels:  recursion

Recursion Tree Visualizer

🥇 Winner project of the AlgoExpert SWE Project Contest 🥇

Overview

Stop drawing recursion trees by hand. Watch the demo video or check out the live project.

Folders structure

  • packages/web: react user interface.
  • packages/lambda: serverless lambda function to execute user-defined code remotely.

Local development

Web

In the packages/web directory, run:

# to install all dependencies
> npm install

# to run the app on http://localhost:3000
> npm run start

Lambda

You can use the Amazon Runtime Interface Emulator (RIE), already contained in the docker image, to test the Lambda function.

In the packages/lambda directory, run:

# build your local image
> docker build --tag dev-image .

# create and run a container using AWS RIE as executable to emulate a server for your lambda function
> docker run --rm -p 8080:8080 dev-image

# make a http request to your function, passing event with the -d in body field (escaped json)
> curl -XPOST "http://localhost:8080/2015-03-31/functions/function/invocations" -d '{"body":"{}"}'

Deploy to production

Web

Set your lambda API endpoint in packages/web/src/config/api.ts.

Ships packages/web on Vercel.

Lambda

The deployment of the Lambda function is automatized by the workflow cd-lambda-function. You will need to complete the following set-up steps to use it:

  1. Create the following AWS resources:

    • Lambda function defined as a container image

    • API Gateway to trigger the lambda function with CORS support

    • ECR repository to store your Docker images

  2. Store an IAM user access key in GitHub Actions secrets named AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

  3. Change the workflow file github/workflows/cd-lambda-function.yml:

    • Replace the value of the AWS_REGION env with the region of all your AWS resources.

    • Replace the value of the AWS_ECR_REPOSITORY_NAME env with your repository's name.

    • Replace the value of the AWS_LAMBDA_FUNCTION_NAME env with your function's name.

Acknowledgements

To position each node of the tree on a 2D plane in an aesthetically pleasing way, I implemented Reingold-Tilford's algorithm. Thanks to Drawing Presentable Trees and Improving Walker's Algorithm to Run in Linear Time articles.

Thanks CodeJar for the lightweight code editor embedded in browser.

Compatibility

For a better experience, I recommend using a chromium-based browser like Chrome or Edge.

Contact me

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].