Code Monkey home page Code Monkey logo

cs50-week-5-note's Introduction

CS50-Week-5-Note

Cs50 Week5 Data-Structure Notes

What Is Data-Structured

    It is the way of arranging the data to be able to use effectively.

Summary Of Week 5

    1. Arrays
    2. Link Lists
    3. Binary Trees
    4. Hash Table
    5. Tries
    6. Abstract Data Structure

2. Link Lists

    Link lists are the data structure that each node in list is pointing to its contiguous another node.
    `` O(n) time ``
    [ Node 1 -> Node 2 -> Node 3 -> NULL ]

3. Binary Trees

    It is like the family tree that goes down from root node to children node.
    The left sub-node of current node will be smaller and the right will be greater than the current node.
                        
                           4
                        /     \
                       2       6
                      / \     / \
                     1   3   5   7
                     
    `` O(log(n)) recursively time ``

4. Hash Table

    Hash Table is the array made of link list.
    `` O(n) time ``
    
                  [A  -> Aa   , B ->Bb      , C -> Cc ]

5. Tries

    Tries is the binary tree made of array.
    `` O(1) ``
                  [A , B  C ]
                  /
                [A,B, C]

6.1 Queue

    - First In First Out 
      Just the same idea of Java Script Callback Queue

6.2 Stack

    - Last In First Out 
      Just the same idea of Java Script Call Stack

Typedef and Struct

      struct  = we can create our own custom data type with struct
                ``C
                    struct customName{
                      init : number;
                      string : "string";
                      }
                 ``
                 
      typedef = we can rename the created data type with our own custom name
                `` C
                
                    typefef namedData newName;
                    
                 ``

cs50-week-5-note's People

Contributors

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