📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
一亩三分地 › 标签 › 标签 › 树/链表/图 › 相关帖子

标签:
树/链表/图 (#树/链表/图)

175个主题 | 1210个回复 | 最后更新: 2025-6-4 11:53

相关帖子

版块 回复/查看 最后发表
[数据结构] 学习资料汇集

还是抛砖Data Structures and Algorithm Analysis in C++, Mark Allen WeissData Structures & Algorithms in Java, Robert Lafore.入门挺好的joyce: 我来推荐 ...

attachment
刷题 40 27280 michaelmiaomiao 2020-6-11 08:06
LinkedList Dummy Head有什么好处?

这里说道“第四,dummy head非常有用,可以使代码简洁很多,并且容易写bug free的code。这个技巧可以大量使用”不是很能体会到dummy head的用途大家能举几个常见的 ...

刷题 19 16410 肥宅快乐水 2018-5-23 10:54
拜托大家帮我看一下这道题

大家好!图片中的代码是为了解决leetcode里reverse nodes in k-group问题的。其中cur.next=pre.next我想了很久都无法理解,因为第一次循环的时候cur=pre.next.如果有学有余 ...

attach_img
刷题 2 1410 dxr27kejj 2015-4-22 00:19
Implement Iterator of Binary Search Tree

LintCode链接 http://lintcode.com/en/problem/implement-iterator-of-binary-search-tree/左下角有一个Super Star: Extra memory usage O(1) 我想了想如果要满足hasNext ...

刷题 3 2870 anonym 2015-4-2 11:05
Google电面题,List中的duplicate最小距离

google电面fail掉的题:有个List,里面有duplicates,比如[A,B,B,A,C].现在有另一个input是一个int存放minimal distance。要求return的list里让duplicate之间的最小距 ...

刷题 25 5828 mingmingya 2015-3-16 11:37
数据结构参考书Open Data Structures

大部分题目虽然都是算法的,感觉其实数据结构还是非常重要的尤其对于非cs专业自学者,个人感觉读起来这本书(免费pdf)讲的http://opendatastructures.org/对数据结构的理 ...

刷题 0 1877 非其鬼不神 2015-2-9 04:53
求Java BST 插入一个新节点的方法

本人Java 不是特别好,这里请教一个简单的问题,向BST(binary search tree) 插入一个新节点的方法 ,我写了一个recursive的,但是要插入的这个节点没有被插上,原树里面这 ...

attach_img
刷题 11 3606 你不知道这个id 2015-1-8 14:38
不太理解 BST的remove的code

[ 本帖最后由 voiding 于 2014-11-9 11:32 编辑 ]\n\n又遇到recursion的问题想请教大家,下面的code的是Binary Search Tree的delete a node的code, 我不理解这里 x.left ...

attach_img
刷题 5 1894 voiding 2014-11-24 03:03
Binary Tree和Binary Search Tree的递归写法空间复杂度?

通常递归写法的空间复杂度到底是O(h)还是O(logn)? 被搞糊涂了。

刷题 5 2502 sandouliu 2014-5-11 02:54
请问有图论题的online judge吗

想系统练一练,多谢了

刷题 5 1746 hetong_007 2014-4-29 14:26
现场写advanced data structuture的时候多吗?

比如trie, suffix array, interval tree之类的?要bug-free不容易啊。

刷题 2 1754 ototsuyume 2014-3-20 14:01
confusing on an interview question

This is an interview question in "Cracking the coding interview". My code and test cases are here: #include using namespace std; struct node { int ...

刷题 1 1421 hxtang 2014-2-3 09:53
关于subtree的问题。。。

我有点搞混了对subtree的理解,不知道有没有人可以解释一下。。如果有一个这样的main binary tree (这里我拿了binary search tree来作例子): ...

刷题 4 1852 麻倉枼 2013-5-8 06:59
[CareerCup 4.1] Check whether a tree is balanced 書上答案似乎有錯誤

career 4.1 題目:Implement a function to check if a tree is balanced. For the purposes of this question, a balanced tree is defined to be a tree such that no ...

attach_img
刷题 11 2736 zhuzhda 2013-3-3 12:50
Dijkstra Alg 能找到所有的最短路径吗?

我有个疑问,如果两个点之间有两条相同长度的最短路径,比如a->b=1,b->c=1,a->c=2那a-c之间的最短路径就是两条,那么Dijkstra方法好像是不能把两条都找出来吧?如果想 ...

刷题 11 4145 ac/dc 2013-2-15 07:54
123456789
>
返回顶部