二维若

Posted alex-bn-lee

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了二维若相关的知识,希望对你有一定的参考价值。

BSTrootleafinsert.txt

Consider an initially empty BST and the sequence of values 1 2 3 4 5 6.

  1. Show the tree resulting from inserting these values "at the leaf". What is its height?
  2. Show the tree resulting from inserting these values "at the root". What is its height?
  3. Show the tree resulting from an alternate at-root-insertion and at-leaf-insertion, starting with at-the-leaf. What is its height?

说明:at the leaf:说明直接插入到 leaf 即可,不需要移动

at the root:说明需要调整到 root,但是一个一个调整

Splaying.txt

  1. Given an initially empty splay tree:
    • show the changes in the splay tree after each splay-insertion of the node values 5 3 8 7 4

  2. Given an initially empty splay tree:
    1. show the changes in the splay tree after each splay-insertion of the node values b c d e f g ...

    2. and then the splay tree after a search for node a ...

    3. and then the splay tree after a search for node d

说明:如果 search 不到元素,就将那个元素 splay,按照 zigzag 或者 zigzig 规则操作

以上是关于二维若的主要内容,如果未能解决你的问题,请参考以下文章

《剑指Offer》题目——二维数组中的查找

剑指offer第一题:二维数组的查找(python)

怎样识别照片中的二维码

C语言中二维数组行指针是啥

为啥识别不了二维码

PHP 生成二维码