{"id":19884527,"url":"https://github.com/ahmetcerol/binarysearchtree-bfs-dfs","last_synced_at":"2025-08-18T09:44:43.959Z","repository":{"id":188883014,"uuid":"497994067","full_name":"ahmetcerol/BinarySearchTree-BFS-DFS","owner":"ahmetcerol","description":"In this project, We develop the DFS and BFS algorithms in the binary search tree.","archived":false,"fork":false,"pushed_at":"2023-10-20T12:01:11.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T03:42:26.965Z","etag":null,"topics":["bfs-algorithm","binary-search-tree","dfs-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","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/ahmetcerol.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":"2022-05-30T15:13:15.000Z","updated_at":"2023-10-20T12:00:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b65e618-62ef-406b-a7e2-1d91bd27b0aa","html_url":"https://github.com/ahmetcerol/BinarySearchTree-BFS-DFS","commit_stats":null,"previous_names":["ahmetcerol/binarysearchtree-bfs-dfs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmetcerol/BinarySearchTree-BFS-DFS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetcerol%2FBinarySearchTree-BFS-DFS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetcerol%2FBinarySearchTree-BFS-DFS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetcerol%2FBinarySearchTree-BFS-DFS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetcerol%2FBinarySearchTree-BFS-DFS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetcerol","download_url":"https://codeload.github.com/ahmetcerol/BinarySearchTree-BFS-DFS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetcerol%2FBinarySearchTree-BFS-DFS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270974739,"owners_count":24678250,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"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":["bfs-algorithm","binary-search-tree","dfs-algorithm"],"created_at":"2024-11-12T17:27:38.224Z","updated_at":"2025-08-18T09:44:43.920Z","avatar_url":"https://github.com/ahmetcerol.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BinarySearchTree-BFS-DFS\n#### Ahmet Can EROL\n\n*Bu projede ikili sıralama ağacı oluşturarak İlk Derinlik Arama (Depth First Search \n– DFS) ve İlk Genişlik Arama (Breadth First Search – BFS) algoritmalarını geliştirdik.\nGeliştirilen arama algoritmaları için \"veri.h\" dosyasında verilen diziler ile \noluşturulacak üç farklı ağaç üzerinde arama işlemleri gerçekleştirildi.Kullanılan veri yapıları kısaca*\n\n* Kuyruk(Queue): Breadth First Search algoritmasını geliştirmek için C++’ın \nbize hazır olarak sunmuş olduğu \u003cqueue\u003e kütüphanesini kullandım.\n  \n * Yığın(Stack): Depth First Search algoritmasını geliştirmek için C++’ın bize \nhazır olarak sunmuş olduğu \u003cstack\u003e kütüphanesini kullandım. \n  \n * İkili Sıralama Ağacı(Binary Search Tree): Verileri organize etmek için \nkullanılan bir çeşit ikili ağaçtır. İkili ağaçtan temel farkı, verilerin sıralanmış bir \nşekilde tutulmasıdır, bu sayede arama algoritmalarını kullanabiliriz. İkili arama \nağaçlarında; her düğümün sağ çocuğu kendisinden büyük, sol çocuğu ise \nkendisinden küçüktür. Bu ağaçlarda çalışan arama algoritması önce kökten \nbaşlar, eğer aranan eleman kökten büyükse sağ çocuğa, kökten küçükse sol \nçocuğa ilerler.\n  \n * DFS(Depth First Search): Bir ağaç dolaşma algoritmasının ilk önce alt \nseviyesinde bulunan komşularını araması durumudur. Önce bir başlangıç \nDüğüm’ü seçilir ve ziyaret edilir. Seçilen düğümün bir komşusu seçilir ve ziyaret \nedilir. 2.adım ziyaret edecek komşu kalmayıncaya kadar tekrar edilir. Komşu \nkalmadığında tekrar geri dönülür ve önceki ziyaret edilmiş düğümler için adım 2\nve 3 tekrar edilir.\n  \n * BFS(Breadth First Search): Bir başlangıç düğümü belirlenir ve tüm komşular \nziyaret edilir. DFS’ den farklı olarak BFS’ de ziyaret edilen komşunun aynı anda \ngidilebilecek tüm komşuları aynı anda kuyruğa eklenir.\n  \n * Chrono Kütüpanesi: Aramalar arasındaki hızı ölçebilmek için kullanacağız.\n\n## English\n\nIn this project, we developed Depth First Search (DFS) and Breadth First Search (BFS) algorithms by constructing a binary search tree on three different arrays provided in the \"veri.h\" file. The data structures used are briefly described as follows:\n\n- Queue: To improve the Breadth First Search algorithm, we used the \u003cqueue\u003e library provided by C++ to manage the queue data structure.\n\n- Stack: To improve the Depth First Search algorithm, we used the \u003cstack\u003e library provided by C++ to manage the stack data structure.\n\n- Binary Search Tree: This is a type of binary tree used to organize data. The key difference from a binary tree is that data is stored in a sorted manner, allowing us to use search algorithms. In binary search trees, each node's right child is greater than itself, and the left child is smaller. The search algorithm that runs on these trees starts from the root, and if the element being searched for is greater than the root, it moves to the right child; if it's smaller, it moves to the left child.\n\n- DFS (Depth First Search): It is an algorithm for traversing a tree or graph, where it first explores the child nodes at the deepest level. It starts by selecting and visiting an initial node. Then, it selects one of its neighbors and visits it. Steps 2 and 3 are repeated until there are no more neighbors to visit. When there are no more neighbors to visit, it backtracks and repeats steps 2 and 3 for previously visited nodes.\n\n- BFS (Breadth First Search): In BFS, an initial node is selected, and all its neighbors are visited. Unlike DFS, in BFS, all neighbors that can be reached from the current node are added to a queue simultaneously.\n\n- Chrono Library: This library is used to measure the speed of searches between different algorithms.\n\nThese data structures and algorithms are essential for conducting efficient searches on the binary search tree, either in a depth-first manner (DFS) or a breadth-first manner (BFS). The choice between DFS and BFS depends on the specific problem and the requirements of the search operation.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetcerol%2Fbinarysearchtree-bfs-dfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetcerol%2Fbinarysearchtree-bfs-dfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetcerol%2Fbinarysearchtree-bfs-dfs/lists"}