ICode9

精准搜索请尝试: 精确搜索
  • 推荐一个采用方便程序员在线动画学习常用算法的良心网站2019-04-13 10:52:48

    网址:https://algorithm-visualizer.org/ 进去之后的页面是程序员熟悉的码农风格: 假设我想学习冒泡排序算法,在搜索栏里输入sort,在结果列表里选择bubble sort: 点击之后,排序操作处于就绪状态,点击play开始: 此时右边的JavaScript代码像我们平时单步调试一样逐行执行,同时每一步执行

  • Libre OJ 144、145 (DFS序)2019-03-15 23:45:29

    部分参考自博客:https://blog.csdn.net/hpu2022/article/details/81910490 在许多问题中,由于树结构复杂通常会导致问题很棘手,因为其实非线性结构,操作起来也甚是费时。 例如:对于一棵树,含有n个节点,每个节点拥有相应的权值,我们进行很多个操作,比如可以修改某个节点的权值,查找以某个节点

  • python随笔2019-03-14 12:40:40

    代码 import turtleturtle.bgcolor("red")turtle.fillcolor("yellow")turtle.color('yellow')turtle.speed(10)#主星turtle.begin_fill()turtle.up()turtle.goto(-600,220) turtle.down()for i in range (5): turtle.forward(150) turtl

  • 目录遍历脚本2019-03-07 13:55:23

    目录遍历脚本[root@NewCDH-0--144 opt]# cat dir.sh #!/usr/bin/sh DIR=$(cd "$(dirname "$0")"; pwd) echo "当前目录:$DIR" ROOT=$DIR for file in $ROOT/* do if [ -d "$file" ] then echo "$file" cd $file #pwd &a

  • 144. 二叉树的前序遍历2019-03-06 13:49:51

    二叉树的前序遍历 给定一个二叉树,返回它的 前序 遍历。 示例: 输入: [1,null,2,3] 1 \ 2 / 3 输出: [1,2,3] 思路+代码+注释: public List<Integer> preorderTraversal(TreeNode root) { /* 思路: 前序遍历-根左右 采用

  • TypeError not all arguments converted during string formatt2019-02-16 12:41:16

    1、错误描述   >>> a=1; >>> b=1; >>> for i in range(1,21): print('121d %121d' % (a,b)); if(i%3==0): a=a+b ; b=a+b; Traceback (most recent call last): File "<pyshell#23>", line 2, in <module>

  • LeetCode-144-Binary Tree Preorder Traversal2019-02-06 18:01:59

    算法描述: Given a binary tree, return the preorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,2,3] Follow up: Recursive solution is trivial, could you do it iteratively? 解题思路:先根非递归遍历。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有