{"id":22430020,"url":"https://github.com/brevex/binary-search-tree","last_synced_at":"2025-06-12T03:37:59.015Z","repository":{"id":204570283,"uuid":"712163223","full_name":"Brevex/Binary-Search-Tree","owner":"Brevex","description":"A binary search tree made in Java that manipulates integer values.","archived":false,"fork":false,"pushed_at":"2023-11-19T22:21:55.000Z","size":465,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T12:11:59.960Z","etag":null,"topics":["algorithm","binary-search-tree","computer-science","data-structures","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Brevex.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}},"created_at":"2023-10-30T23:21:33.000Z","updated_at":"2023-11-19T22:23:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"18e3ddfd-c2b8-485f-b6e5-508b0184d0b6","html_url":"https://github.com/Brevex/Binary-Search-Tree","commit_stats":null,"previous_names":["brevex/binary-search-tree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brevex%2FBinary-Search-Tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brevex%2FBinary-Search-Tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brevex%2FBinary-Search-Tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brevex%2FBinary-Search-Tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brevex","download_url":"https://codeload.github.com/Brevex/Binary-Search-Tree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798357,"owners_count":20673902,"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":["algorithm","binary-search-tree","computer-science","data-structures","java"],"created_at":"2024-12-05T21:06:49.244Z","updated_at":"2025-03-27T07:14:09.277Z","avatar_url":"https://github.com/Brevex.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align = \"center\"\u003e Java Binary Search Tree \u003c/h1\u003e\u003cbr\u003e\n\n\u003ch2\u003e \u0026#128269; About the project \u003c/h2\u003e\n\n\u003cp\u003eA binary search tree made in Java that manipulates integer values. In addition to \nconventional insertion, removal and search operations, the tree also has additional \nmethods for better analysis of the structure.\u003c/p\u003e\u003cbr\u003e\n\n\u003ch2\u003e \u0026#128296; Dependencies and Execution \u003c/h2\u003e\n\n\u003col\u003e\n   \u003cli\u003eDownload JDK by \u003ca href=\"https://www.oracle.com/br/java/technologies/downloads/\" target=\"_blank\"\u003eclicking here\u003c/a\u003e.\u003c/li\u003e\n   \u003cli\u003eConfigure JDK on your machine.\u003c/li\u003e\n   \u003cli\u003eDownload this project and open the terminal inside the \u003ccode\u003esrc\u003c/code\u003e folder.\u003c/li\u003e\n   \u003cli\u003eWith the terminal open, run in sequence the following commands:\u003c/li\u003e\n\u003c/ol\u003e\n\n \tjavac TreeProgram.java  \n\u003cbr\u003e\n\n\tjava TreeProgram\n\n\u003ch2\u003e \u0026#128196; Test File \u003c/h2\u003e\n\n\u003cp\u003eThe program has a test file. Inside the \u003ccode\u003esrc\u003c/code\u003e folder you will find a file called \u003ccode\u003etestFile.txt\u003c/code\u003e, in \nit you can write one command per line so that the program starts and executes each command \nautomatically without the need to enter the commands manually.\u003c/p\u003e\u003cbr\u003e\n\n\u003e :warning: **The program will only recognize the test file if it is named \"testFile.txt\"** \u003cbr\u003e\u003cbr\u003e\n\u003e :warning: **The file must be in the \u003ccode\u003esrc\u003c/code\u003e folder**\n\n\u003cbr\u003e\u003cdetails\u003e\n   \t\u003csummary\u003eTest File Exemple\u003c/summary\u003e\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eCreate a \u003ccode\u003etestFile.txt\u003c/code\u003e file with the lines below\u003c/p\u003e\n \n\tinsert 22\n\tinsert 16\n\tinsert 24\n\tinsert 33\n\tcomplete\n\tfull\n\tnth 3\n\tinsert 36\n\tfull\n\tpreorder\n\tremove 50\n\tinsert 15\n\tinsert 39\n\tremove 32\n\tposition 15\n\tinsert 39\n\tnth 5\n\tmedian\n\tmean 20\n\tsearch 36\n\tinsert 25\n\tmedian\n\tprint 1\n\tprint 2\n \n\u003c/details\u003e\u003cbr\u003e\n\n\u003ch2\u003e \u0026#128302; Technologies Used \u003c/h2\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://skillicons.dev\"\u003e\n    \u003cimg src=\"https://skillicons.dev/icons?i=java\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\u003ch2\u003e \u0026#128161; Program Functions \u003c/h2\u003e\n\n\u003cp\u003eAs mentioned, the program has several other functions in addition to the basic insertion, removal and \nsearch. the program works either by manually receiving the functions or with a test file, below are the available functions:\u003c/p\u003e\u003cbr\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003einsert\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eAdds a new element to the tree\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/insert.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eremove\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eRemoves a element from the tree\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/remove.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eprint\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eAllows the user to print the tree in 2 different styles\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/print.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003enth\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eSearch for the element corresponding to the position passed in the command parameter\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/nthElement.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eposition\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eReturns the position of the element inserted in the command parameter\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/position.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003emedian\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eReturns the element that occupies the median of the tree\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/median.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003emean\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eReturns the arithmetic mean of tree values\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/arithmeticMean.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003efull\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eAnalyzes whether the tree is full or not\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/full.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003ecomplete\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eAnalyzes whether the tree is complete or not\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/complete.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003epreorder\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003ePrint the tree in preorder\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/preorder.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003ecomplete\u003c/summary\n\t\u003cbr\u003e\u003cbr\u003e\u003cp\u003eSearches for an element in the tree and returns whether it exists or not\u003c/p\u003e\n\t\u003cimg align = \"center\" src=\"https://github.com/Brevex/Binary-Search-Tree/blob/main/readme%20images/search.png\"\u003e\n\u003c/details\u003e\n\n\u003cbr\u003e\u003ch3 align = \"center\"\u003e - By \u003ca href = \"https://www.linkedin.com/in/breno-barbosa-de-oliveira-810866275/\" target = \"_blank\"\u003eBreno\u003c/a\u003e - \u003c/h3\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrevex%2Fbinary-search-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrevex%2Fbinary-search-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrevex%2Fbinary-search-tree/lists"}