Git Product home page Git Product logo

binary-search-tree's Introduction

Binary Search Tree Projesi

Patika.dev, Veri Yapıları ve Algoritmalar dersinin son aşaması olan projeler kısmından Binary Search Tree Projesi.


[7, 5, 1, 8, 3, 6, 0, 9, 4, 2] dizisinin Binary-Search-Tree aşamalarını yazınız.

İkili arama ağacı, her düğümün solundaki koldan ulaşılabilecek bütün verilerin düğümün değerinden küçük, sağ kolundan ulaşılabilecek verilerin değerinin o düğümün değerinden büyük olmasını şart koşar.
Açıklama
root=7 7

5 sayısı 7'den küçük olduğunda 7'nin soluna ekledik

Açıklama
7
/
5 ekledik 5

1 sayısı 5'ten ve 7'den küçük olduğunda 7 ve 5'in soluna ekledik

Açıklama
7
/
5
/
1 ekledik 1

8 sayısı 7'den büyük olduğunda 7'nin sağına ekledik

Açıklama
7
/ \
8 ekledik 5 8
/
1

3 sayısı 7'den ve 5'ten küçük olduğunda 5'in soluna, 1'den büyük olduğunda 1'in sağına ekledik

Açıklama
7
/ \
5 8
/
1
\
3 ekledik 3

6 sayısı 7'den küçük olduğunda 7'nin soluna, 5'ten büyük olduğunda 5'in sağına ekledik

Açıklama
7
/ \
5 8
/ \
6 ekledik 1 6
\
3

0 sayısı 7'den, 5'ten ve 1'den küçük olduğunda 1'in soluna ekledik

Açıklama
7
/ \
5 8
/ \
1 6
/ \
0 ekledik 0 3

9 sayısı 7'den ve 8'den büyük olduğunda 8'in sağına ekledik

Açıklama
7
/ \
5 8
/ \ \
9 ekledik 1 6 9
/ \
0 3

4 sayısı 7'den ve 5'ten küçük olduğunda 5'in soluna, 1'den ve 3'ten büyük olduğunda 3'ün sağına ekledik

Açıklama
7
/ \
5 8
/ \ \
1 6 9
/ \
0 3
\
4 ekledik 4

2 sayısı 7'den ve 5'ten küçük olduğunda 5'in soluna, 1'den büyük olduğunda 1'in sağına ve 3'ten küçük olduğunda 3'ün soluna ekledik

Açıklama
7
/ \
5 8
/ \ \
1 6 9
/ \
0 3
/ \
2 ekledik 2 4

Patika.dev profilime buradan ulaşabilirsiniz.

binary-search-tree's People

Contributors

hakannyucel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.