Skip to main content

GitHub 一万多 Star,一个可视化学算法的好工具


程序员学算法和数据结构时,如果从纯文本和静态图来学,挺枯燥的。

相反,可视化动画工具,真是一个非常棒的帮手。这类工具/网站,我们曾介绍过 3 个:

  • 旧金山大学数据结构和算法的可视化学习工具
http://hao.jobbole.com/visualizing-algorithms-and-data-structure/

  • VisuAlgo:通过动画学习算法和数据结构
http://hao.jobbole.com/visualgo/

  • Algomation:查看、创建和分享算法的学习平台
http://hao.jobbole.com/algomation/

今天我们发现一个同类型的新网站 Algorithm Visualizer,做得很好。

网址是:http://algorithm-visualizer.org  


下面通过冒泡排序,大概解释一下 Algorithm Visualizer 这个工具:


①、选择区

汇总了好多:回溯法、加密算法、动态规划、图搜索、贪婪算法、搜索算法、排序算法等

② ChartTracer

长条图方式展示每次交换的过程。每次交换位置的两个数,对应的长条会红色高亮。

③ Array1DTracer

作用和②类似

④ LogTracer

日志模式记录每次 swap 的过程


⑤ 工具栏

开始/暂停/下一步/上一步

⑥ 

这块是定义这个算法的一些相关基本信息。里面的 ChartTracer、Array1DTracer、LogTracer,对应上方的 ②③④。数组大小为 15。


如果你是看加密算法的演示过程,那 ⑥ 这里就是展示加密算法的一些基本信息。

⑦ 核心算法


Algorithm Visualizer 在 GitHub 有 10.6k+ Star:

https://github.com/algorithm-visualizer/algorithm-visualizer

Comments

Popular posts from this blog

CKA Simulator Kubernetes 1.22

  https://killer.sh Pre Setup Once you've gained access to your terminal it might be wise to spend ~1 minute to setup your environment. You could set these: alias k = kubectl                         # will already be pre-configured export do = "--dry-run=client -o yaml"     # k get pod x $do export now = "--force --grace-period 0"   # k delete pod x $now Vim To make vim use 2 spaces for a tab edit ~/.vimrc to contain: set tabstop=2 set expandtab set shiftwidth=2 More setup suggestions are in the tips section .     Question 1 | Contexts Task weight: 1%   You have access to multiple clusters from your main terminal through kubectl contexts. Write all those context names into /opt/course/1/contexts . Next write a command to display the current context into /opt/course/1/context_default_kubectl.sh , the command should use kubectl . Finally write a second command doing the same thing into ...

OWASP Top 10 Threats and Mitigations Exam - Single Select

Last updated 4 Aug 11 Course Title: OWASP Top 10 Threats and Mitigation Exam Questions - Single Select 1) Which of the following consequences is most likely to occur due to an injection attack? Spoofing Cross-site request forgery Denial of service   Correct Insecure direct object references 2) Your application is created using a language that does not support a clear distinction between code and data. Which vulnerability is most likely to occur in your application? Injection   Correct Insecure direct object references Failure to restrict URL access Insufficient transport layer protection 3) Which of the following scenarios is most likely to cause an injection attack? Unvalidated input is embedded in an instruction stream.   Correct Unvalidated input can be distinguished from valid instructions. A Web application does not validate a client’s access to a resource. A Web action performs an operation on behalf of the user without checkin...