数据结构的动画演示

动画演示可以帮助同学更好地学习了解数据结构。下面列出的站点有些提供了交互,初始数据由用户提供,然后再演示。

欢迎同学们提供更好的站点。

 

http://visualgo.net

 

旧金山大学David Galles做的各种可视化的数据结构

http://www.cs.usfca.edu/~galles/visualization/Algorithms.html

 

 

支持树的演示(包括遍历)

http://btv.melezinek.cz 

 

哈夫曼树

 

https://people.ok.ubc.ca/ylucet/DS/Huffman.html

 

这个可能需要FQ

http://huffman.ooz.ie/

 

第一组数据 {7,5,2,4} aaaaaaabbbbbccdddd

第二组数据 {5,29,7,8,14,23,3,11}aaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccddddddddeeeeeeeeeeeeeefffffffffffffffffffffffggghhhhhhhhhhh

数据生成程序:

#include <stdio.h>
int main(void)
{
  for(int i = 0; i < 5; i++)
    printf("a");
  for(int i = 0; i < 29; i++)
    printf("b");
  for(int i = 0; i < 7; i++)
    printf("c");
  for(int i = 0; i < 8; i++)
    printf("d");
  for(int i = 0; i < 14; i++)
    printf("e");
  for(int i = 0; i < 23; i++)
    printf("f");
  for(int i = 0; i < 3; i++)
    printf("g");
  for(int i = 0; i < 11; i++)
    printf("h");
}

 

KMP算法 

 http://whocouldthat.be/visualizing-string-matching/

 

 

下面有二叉树遍历的Java applet,必须支持Java运行环境 

 http://groups.engin.umd.umich.edu/CIS/course.des/cis350/treetool/

 

http://qiao.github.io/PathFinding.js/visual/

 

广义表

http://rextester.com/l/common_lisp_online_compiler

https://www.tutorialspoint.com/lisp/lisp_lists.htm

(write (list-length '()))
(terpri)
(write (list-length '(())))
(terpri)
(write (car nil))
(terpri)
(write (car( )))
(terpri)
(write (cdr( )))
(terpri)
(write (cdr '(a ( b c d ))))
(terpri)
(write '(a b (c d) (e (f g))))
(terpri)
(write (cdr '(a b (c d) (e (f g)))))
(terpri)
(write (cdr (cdr '(a b (c d) (e (f g))))))
(terpri)
(write (car (cdr (cdr '(a b (c d) (e (f g)))))))
(terpri)
(write (cdr (car (cdr (cdr '(a b (c d) (e (f g))))))))
(terpri)
(write (car (cdr (car (cdr (cdr '(a b (c d) (e (f g)))))))))

posted on 2014-04-14 21:26  天地过客  阅读(1263)  评论(0编辑  收藏  举报

导航