- 博客(6)
- 问答 (5)
- 收藏
- 关注
原创 leetCode26:Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with
2015-12-31 16:25:35 528
原创 leetCode61:Rotate List
Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 问题需求:将单链表循环右移,移动次数有参数所决定。 问题分析
2015-12-27 14:20:42 421
原创 leetCode24:Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. Y
2015-12-26 16:03:18 353
原创 leetCode2:Add Two Numbers
/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2) {
2015-12-26 14:08:37 93
原创 LeetCode,141:Linked List Cycle
C语言实现判断单链表是否带有循环 LeetCode原题如下: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 对于一个普通的单链表(双向链表以及循环链表不算在内),链表最后一个元素指针==NULL,一
2015-12-25 10:38:33 383
空空如也
安卓,Fragment加载不同适配器
2016-08-18
音乐播放器的歌词显示问题( 漏掉歌词 )
2016-02-10
C语言单链表的插入求解了
2015-12-22
关于C语言二重指针的疑惑求解
2015-12-19
完全二叉树的计算结点总数算法
2015-07-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人