HackerRank
文章平均质量分 65
诗意de栖居
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HackerRank Largest Rectangle
题目链接 Problem Statement There are N buildings in a certain two-dimensional landscape. Each building has a height given byhi,i∈[1,N]. If you join K adjacent buildings, they will form a原创 2015-12-18 21:56:20 · 426 阅读 · 0 评论 -
HackerRank Truck Tour
题目链接 #include int FindMin(int *queue, int n) { long long sum = 0; int i = 0, j = 0; for (; i < n; i++) { sum += queue[i]; if (sum < 0) { sum = 0; j = i + 1; } } return j; } int原创 2015-12-19 10:42:34 · 629 阅读 · 0 评论 -
HackerRank Self Balancing Tree(AVL树)
题目链接 /* Node is defined as : typedef struct node { int val; struct node* left; struct node* right; int ht; } node; */ int Height(node *T) { if (!T) return -1; //In this qu原创 2015-12-19 22:21:07 · 531 阅读 · 0 评论 -
HackerRank Huffman Decoding(Huffman解码)
题目链接 /* The structure of the node is typedef struct node { int freq; char data; node * left; node * right; }node; */ void decode_huff(node * root,string s) { char str[50原创 2015-12-19 10:39:45 · 566 阅读 · 0 评论 -
HackerRank Reverse a linked list(逆置链表)
题目链接 /* Reverse a linked list and return pointer to the head The input list will have at least one element Node is defined as struct Node { int data; struct Node *next; } */原创 2015-12-19 10:37:02 · 723 阅读 · 0 评论 -
HackerRank Find Median(中位数)
题目链接 Problem Statement The median of a finite list of numbers can be found by arranging all the integers from lowest to highest value and picking the middle one. For example, the median of{3原创 2015-12-18 22:52:43 · 479 阅读 · 0 评论
分享