//Data structure and algorithm 一、数据结构和算法 在任何语言中都是通用的,是一独立的学科,除了数据结构就是算法 常用的数据结构: 数组(Aray),( Stack),队列( Queue),二叉树、链表( Linked List)、哈希表、散列表(Hash)等算法 冒泡 ...
分类:
编程语言 时间:
2018-08-21 10:42:41
阅读次数:
190
Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non negatives, and all ...
分类:
其他好文 时间:
2018-08-20 17:55:35
阅读次数:
166
熟悉了一下linkedlist的构造和处理 ...
分类:
其他好文 时间:
2018-08-18 00:51:12
阅读次数:
121
Given a circular linked list, implement an algorithm which returns node at the beginning of the loop. DEFINITION Circular linked list: A (corrupt) lin ...
分类:
其他好文 时间:
2018-08-17 20:04:44
阅读次数:
155
109. Convert Sorted List to Binary Search Tree (AC) /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * L... ...
分类:
其他好文 时间:
2018-08-17 00:42:41
阅读次数:
166
426. Convert Binary Search Tree to Sorted Doubly Linked List(AC) Convert a BST to a sorted circular doubly-linked list in-place Iterative(AC) O(n) tim... ...
分类:
其他好文 时间:
2018-08-17 00:41:04
阅读次数:
252
Convert Sorted double linked List to Binary Search Tree In place 闫老师讲的这两个 答案 是把他 看成 single linked list了, 但是对于double linked list , 也适用 base case : at l... ...
分类:
其他好文 时间:
2018-08-17 00:33:34
阅读次数:
230
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:
其他好文 时间:
2018-08-16 23:47:18
阅读次数:
204
We are given head, the head node of a linked list containing unique integer values. We are also given the list G, a subset of the values in the linked ...
分类:
其他好文 时间:
2018-08-15 21:04:51
阅读次数:
143
Remove all elements from a linked list of integers that have value val. Example: Input: 1->2->6->3->4->5->6, val = 6 Output: 1->2->3->4->5 Remove all ...
分类:
其他好文 时间:
2018-08-15 01:19:44
阅读次数:
123