Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.思路: 构建一个简单的字典树,要求实现.....
分类:
其他好文 时间:
2015-06-18 16:51:09
阅读次数:
95
Basic Calculator问题:Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses)...
分类:
其他好文 时间:
2015-06-17 23:06:49
阅读次数:
192
头文件: #include
第一名
char* strstr(char* dest, char* need);
从dest字符串中找出need字符串出现的位置,不比较结束符,找不到返回NULL,找到了返回need出现的位置
第二名
char* strcat(char* dest, char* src);
char*
strncat(char* de...
分类:
其他好文 时间:
2015-06-17 21:45:06
阅读次数:
157
其中包括:strcpy(char *, char *),strncpy();strcat();strncat();strcmp();strncmp();strchr();strrchr();strlen();
strdup();strspn();strpbrk();strtok(); memset();memcpy();memmove();memcmp();memscan();strstr(...
分类:
编程语言 时间:
2015-06-17 21:32:57
阅读次数:
268
题目意思:用队列实现栈,push(),pop(),top(),empty()思路:用两个queue,pop时将一个queue的元素pop再push到另一个队列,queue只留最后一个元素,并pop,再将目标队列变为另一个 ps:用栈实现队列,参考剑指offer 1 class Stack { 2 ....
分类:
其他好文 时间:
2015-06-17 10:52:17
阅读次数:
85
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
系统相关 时间:
2015-06-17 07:06:08
阅读次数:
158
Replace-iOShttps://github.com/MartinRGB/Replace-iOS看了下demo,运行起来超卡......Simply Implement Zee Young'sanimation,the effect is not good enough,still needs...
分类:
移动开发 时间:
2015-06-16 22:52:41
阅读次数:
154
problem:Reverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?solution:头插法逆转链表/*...
分类:
其他好文 时间:
2015-06-16 21:09:03
阅读次数:
175
Implement Stack using Queues问题:Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the el...
分类:
其他好文 时间:
2015-06-16 16:38:02
阅读次数:
95
问题描述:Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack....
分类:
其他好文 时间:
2015-06-16 12:27:06
阅读次数:
126