Skip to content
Header image

张晓安的个人网站

where amazing happens!

  • 云数据中心
    • linux网络
    • SDN
    • 云计算
      • openstack
    • 容器
      • Docker
    • 网络协议
      • HTTP2详解
  • 基础与修养
    • 数据结构与算法
      • 数据结构与算法
      • 2020刷题记录
      • leetcode_meet_me
      • redis中的数据结构与算法
      • 极客时间—-数据结构与算法之美(王争)
        • 队列:队列在线程池等有限资源池中的应用
    • Linux
      • gnu c
      • 内核互斥技术
      • 内核活动
      • 内存管理
      • 文件系统
      • linux开发工具
    • 设计模式
    • 系统架构
      • 高并发
    • 编程语言
      • c++
      • Golang
      • Ruby
      • Python
        • python入门教程
          • 数据模型
          • 词法分析
          • 类与对象
  • 基础设施
    • gRPC
  • 源码笔记
    • Scrapy
    • Celery
  • 我的教程
    • Golang语言入门
  • CSDN
  • github

分类:数据结构与算法

数据结构与算法 / 自我修养

实现霍夫曼编码

2019年7月23日 zhangxa comment on 实现霍夫曼编码

class HuffmanNode: def __init__(self, char, weight, lef […]

Continue Reading ..
数据结构与算法 / 自我修养

图的遍历

2019年7月20日2019年7月23日 zhangxa comment on 图的遍历

使用邻接表存储图。 支持bfs,dfs,获取从指定节点到目的节点的bfs路径,dfs路径。 from coll […]

Continue Reading ..
数据结构与算法 / 自我修养

求所有和等于n的组合

2019年7月18日2019年7月23日 zhangxa comment on 求所有和等于n的组合

给一个数组n,求出所有和等于target的数字组合. def n_sum(n, target, cur=Non […]

Continue Reading ..
数据结构与算法 / 自我修养

字符串算法—判断回文

2019年7月11日2019年7月23日 zhangxa comment on 字符串算法—判断回文

def isHw(a): i, j = 0, len(a)-1 while i <= j: if a[i […]

Continue Reading ..
数据结构与算法 / 极客时间----数据结构与算法之美(王争) / 自我修养

排序—基数排序

2019年7月9日2019年7月23日 zhangxa comment on 排序—基数排序

def radix_sort(a, r, bits): if bits == 0 or len(a) == 0 […]

Continue Reading ..
数据结构与算法 / 极客时间----数据结构与算法之美(王争) / 自我修养

排序—计数排序

2019年7月9日2019年7月23日 zhangxa comment on 排序—计数排序

def count_sort(a, start, end): cnts = [0 for _ in range […]

Continue Reading ..
数据结构与算法 / 极客时间----数据结构与算法之美(王争) / 自我修养

排序—-桶排序

2019年7月9日2019年7月23日 zhangxa comment on 排序—-桶排序

def partition(a, start, end): tmp = a[end] k = start fo […]

Continue Reading ..
数据结构与算法 / 自我修养

归并排序

2019年7月6日2019年7月23日 zhangxa comment on 归并排序

不使用辅助空间: def mergeSort(a, start, end): if start >= end: […]

Continue Reading ..
数据结构与算法 / 自我修养

生成n个从1-n的随机数

2019年7月6日2019年7月23日 zhangxa comment on 生成n个从1-n的随机数

import randomdef n_random(n): n_array = [ i+1 for i in […]

Continue Reading ..
数据结构与算法 / 自我修养

求大于n且是2的幂的最小整数

2019年7月5日2019年7月23日 zhangxa comment on 求大于n且是2的幂的最小整数

int roundup_pow_of_two(int num) { int n = 0; while(num) […]

Continue Reading ..

文章导航

先前文章

知音

  • ThomasViz发表在《Puppet源码剖析—-Type篇(一)》
  • 더나인카지노发表在《让你的项目支持autotools》
  • 123movies发表在《让你的项目支持autotools》
  • Tapentadol 100 MG Tablet发表在《让你的项目支持autotools》
  • Royal CBD发表在《leetcode竞赛题(一)—-生成每种字符都是奇数个的字符串》

最新输出

  • 智能指针 2021年4月11日
  • Linux 虚拟网络设备详解之 “vRouter” 2020年5月20日
  • Puppet源码剖析—-Type篇(一) 2020年5月17日
  • (转)一位程序员工作10年总结的13个忠告 2020年5月17日
  • zip暴力破解工具Python实现 2020年5月4日

归档

  • 2021年4月 (1)
  • 2020年5月 (4)
  • 2020年4月 (1)
  • 2020年3月 (3)
  • 2020年2月 (2)
  • 2019年11月 (1)
  • 2019年10月 (3)
  • 2019年9月 (2)
  • 2019年8月 (10)
  • 2019年7月 (30)
  • 2019年6月 (27)
  • 2019年5月 (52)
  • 2019年4月 (5)
  • 2019年3月 (11)
  • 2019年2月 (10)
  • 2019年1月 (3)
  • 2018年9月 (1)
  • 2018年6月 (1)
  • 2012年2月 (1)
  • 2011年9月 (1)
Proudly powered by WordPress | Theme: x-blog by wpthemespace.com