算法和数据结构
0 人感兴趣 · 18 次引用
- 最新
- 推荐

复杂度分析:如何分析、统计算法的执行效率和资源消耗
我们都知道,数据结构和算法本身解决的是“快”和“省”的问题,所以,执行效率是算法一个非常重要的考量指标。那如何来衡量你编写的算法代码的执行效率呢?这里就要用到我们今天要讲的内容:时间、空间复杂度分析。
[Day22]-[链表] 相交链表
给你两个单链表的头节点 headA 和 headB ,请你找出并返回两个单链表相交的起始节点。如果两个链表不存在相交节点,返回 null 。


如何检测社交网络中两个人是否是朋友关系(union-find 算法)
有时候我们可以需要判断在大型网络中两台计算机是否相连,是否需要建立一条新的连接才能通信;或者是在社交网络中判断两个人是否是朋友关系(相连表示是朋友关系)。在这种应用中,通常我们可能需要处理数百万的对象和数亿的连接


队列实现栈的 3 种方法,全都击败了 100% 的用户!
本文已收录至 Github《小白学算法》系列:https://github.com/vipstone/algorith



算法图解:如何用两个栈实现一个队列?
本文已收录至 https://github.com/vipstone/algorithm 《算法图解》系列。