150
kingoverlord
See the big picture
展开
-
list - insertion sort - AC
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode *in转载 2014-01-21 12:29:49 · 578 阅读 · 0 评论 -
mi
http://gongxuns.blogspot.com/2013/11/leetcode-binary-tree-postorder-traversal.html http://yucoding.blogspot.com/2013/12/leetcode-question-lru-cache.html转载 2014-01-21 13:26:09 · 735 阅读 · 0 评论 -
150。3 - sort List- AC
终于 ac 一道题··· /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {publi转载 2014-01-18 13:06:46 · 766 阅读 · 0 评论 -
150 - reverse a linked list;
#include typedef struct Node { char data; struct Node* next;} Node;void print_list(Node* root) { while (root) { printf("%c ", root->data); root = root->next; } printf("\n");}转载 2014-01-30 07:02:13 · 628 阅读 · 0 评论 -
remove target element from arrary AC
class Solution {public: int removeElement(int A[], int n, int elem) { int i = 0; int num = 0; // suppose a general conditions; // and then apply for the specific c原创 2014-06-24 07:25:38 · 840 阅读 · 0 评论