Giter Site home page Giter Site logo

rodrigosobral2000 / assignments_2020_aed Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 3.9 MB

A brief approach data structures, including AVL and RB trees. As well as sorting algorithms, including Merge and Radix sort.

License: MIT License

Python 100.00%
trees data-structures avl-tree rb-tree sorting-algorithms python-data-structures python-sorting-algorithms radix-sort merge-sort

assignments_2020_aed's Introduction

Algorithms and Data Structures Assignments


Used Technologies πŸ’»


Data Structures - AVL and RB Trees 🌳

About πŸ“‹

AVL Trees

Are a type of binary search tree in which the heights of the two child subtrees of any node differ by at most one. Otherwise it self-balances.

When a new node is inserted into an AVL tree, it is first inserted into a regular binary search tree. Then the tree is rotated to restore the AVL property.

Search, insert and delete operations take O(log n) time in both the average and worst cases.

Example

See more πŸ“š

RB Trees

Are a type of binary search tree in which all the nodes are either red or black.

When a new node is inserted into a RB tree, it is first inserted into a regular binary search tree. Then the tree is rotated to restore the RB property.

Search, insert and delete operations take O(log n) time in both the average and worst cases.

Example Example

See more πŸ“š

Sorting Algorithms - Key Comparasion & Manipulations Based πŸ”‘

Key Comparasion Based - Merge Sort

Is a divide and conquer algorithm that sorts a list of elements by recursively splitting the list into two equal halves, sorting each half, and then merging the two sorted halves. The merge step is the most difficult step of the algorithm.

Time complexity of merge sort is O(n log n) in all cases.

Example

Key Manipulation Based - Radix Sort

Is a sorting algorithm that sorts data based on the digits in the number. It works by dividing the input list into a number of lists, each containing only numbers that have a certain digit in the position being considered. Then the lists are merged to produce the final sorted output. That's why it is a non-comparative sort algorithm. In this case, the first digit being considered is the least significant digit.

Time complexity of radix sort is O(nk) where k is the number of digits in the largest number in the input list.

Example


Contributors ✨

Licenciatura Engenharia InformΓ‘tica - Universidade de Coimbra
Algoritmos e Estruturas de Dados - 2019/2020
Coimbra, 17 de abril de 2020

πŸŽ“ Rodrigo Sobral


License πŸ”—

Have a look at the license file for details


assignments_2020_aed's People

Contributors

rodrigosobral2000 avatar

Stargazers

 avatar

Watchers

 avatar  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.