class TrieNode { // Initialize your data structure here. TrieNode[] child; boolean isWord; public TrieNode() { child = new TrieNode...
分类:
其他好文 时间:
2015-12-06 13:06:50
阅读次数:
137
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Spe...
分类:
其他好文 时间:
2015-12-06 13:03:13
阅读次数:
256
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.top()...
分类:
其他好文 时间:
2015-12-05 22:36:08
阅读次数:
229
题目连接https://leetcode.com/problems/implement-trie-prefix-tree/Implement Trie (Prefix Tree)DescriptionImplement a trie with insert, search, and startsWi...
分类:
其他好文 时间:
2015-12-05 00:21:04
阅读次数:
205
Tasklets are the preferred way to implement deferrable functions in I/O drivers. As already explained,tasklets are built on top of two softirqs named ...
分类:
其他好文 时间:
2015-12-03 08:27:39
阅读次数:
162
(1)strstr寻找子字符串函数的实现#define_CRT_SECURE_NO_WARNINGS1#include<stdio.h>#include<string.h>#include<assert.h>typedefunsignedintuint;char*my_strncat(char*dest,constchar*src,uintcount);{/*my_strncat实现两个相同字符串的链接,因为在这..
分类:
其他好文 时间:
2015-12-03 02:20:58
阅读次数:
174
【字符操作函数】1.strstr()函数用来检索子串在字符串中首次出现的位置,其原型为:char*strstr(constchar*dest,constchar*src);【参数说明】dest为要检索的字符串,src为要检索的子串。【返回值】返回字符串str中第一次出现子串src的地址;如果没有检索到子串,则返回NULL。【..
分类:
其他好文 时间:
2015-12-02 18:47:25
阅读次数:
198
LeetCode-- Implement int sqrt(int x)...
分类:
其他好文 时间:
2015-12-02 10:36:55
阅读次数:
82
Learn how to implement adding a todo in a todo list application reducer.let todo = (state = [], action) => { switch(action.type){ case 'ADD_ITEM...
分类:
其他好文 时间:
2015-12-02 06:31:46
阅读次数:
144
1、查找子字符串函数strstr的实现
char*my_strstr(constchar*dest,constchar*src)//const保护字符串不被更改
{
assert(dest);
assert(src);//断言
char*ptr1=NULL;
char*ptr2=src;
while(*dest)
{
ptr1=dest;//保留匹配成功后的位置指针
src=ptr2;//保留匹配失败后..
分类:
其他好文 时间:
2015-12-01 19:41:19
阅读次数:
126