• 20162314 《Program Design & Data Structures》Learning Summary Of The Eighth Week


    20162314 2017-2018-1 《Program Design & Data Structures》Learning Summary Of The Eighth Week

    Summary of Key Concepts

    • A binary search tree is a binary tree in which, for each node, the elements in the left subtree are less than the parent, and the elements in the right subtree are greater than or equal to the parent.

    • The most efficient binary search trees are balanced, so that half of the viable candidates are eliminated with each comparison.

    • Without any additional processing, the shape of a binary search tree is dictated by the order in which elements are added to it.

    • There are three situations to consider when removing an element from a binary search tree, two of which are straightforward.

    • When removing a node with two children from a binary search tree, the inorder successor is a good choice to replace it.

    • Rotations can be performed on a binary search tree to help rebalance them.

    Problem and solution in teaching materials.

    Why is it important for a binary search tree to be balanced(or close to balanced)?

    • If a binary search tree is balanced, approximately half of the elements are eliminated from consideration with each comparison.
    • The more unbalanced the tree, the closer it gets to a linear structure, which is much less efficient.

    What is the most interesting situation when removing an element from a binary search tree?

    • The most interesting situation when removing an element from a binary search tree occurs when the element has two children,
    • because there is no simple option to replace the element (as there are if it has one child or no children).

    What is a binary search tree rotation?

    • A binary search tree rotation is an operation that helps put a binary search tree back into a balanced state.

    Code hosting

    Summary of error for last week.

    Linear search is always more effective than binary search.The answer should be false, for the situation of "n = 2".

    Evaluate for my partner

    • Advantage and problem in the blog:
      • Concise and comprehensie
      • Uncleary to the content
      • Mould is amazing
    • Advantage and problem in the code:
      • Serious writing.
      • Wonderful idea
      • Too less

    Learning situation of partner

    • 20162310

    • Learning content of partner:

      • Algorithm
      • Recursion
      • HanoiTowers and maze

    Anything else that want to say

    • It's not easy to persere on utizing English to write a blog.But I'm getting used to doing this because of the benefit.

    Academic progress check

    Code line number(increasing/accumulative) Blog number(inc/acc) studying time(inc/acc) progress
    target 5000lines 30articles 400hours
    First week 180/180 1/1 20/20
    Second week 1049/1229 1/2 18/38
    Third week 1037/2266 3/7 22/60
    Fourth week 1120/3386 2/9 30/90
  • 相关阅读:
    shell内置命令eval的具有什么作用
    openwrt中如何在一个软件包中使能busybox中的工具
    go语言中strings包中的Trim函数的作用是什么
    RedisTemplate的各种操作(set、hash、list、string)
    Spring data redis-StringRedisTemplate 用法
    Spring-data-redis 第一天
    Java操作Redis数据
    BootStrap之X-editable插件使用
    bootstrap editable有默认值
    bootstrap editable初始化后表单
  • 原文地址:https://www.cnblogs.com/CS162314/p/7751069.html
Copyright © 2020-2023  润新知