Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n ...
分类:
其他好文 时间:
2018-01-08 14:47:56
阅读次数:
136
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front ...
分类:
其他好文 时间:
2018-01-08 11:02:53
阅读次数:
165
Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. Example 1: Example 2: 时间复杂度:O(logn) ...
分类:
其他好文 时间:
2018-01-04 16:28:49
阅读次数:
189
#include<stdio.h>#include<string.h>#include"c.h"int main(){ char *p="123456123789123"; char a[]="78"; p=strstr(p,a); printf("%s",p); return 0;} ...
分类:
其他好文 时间:
2018-01-02 13:25:27
阅读次数:
197
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below ...
分类:
其他好文 时间:
2017-12-31 20:58:44
阅读次数:
134
DHCP实现 / DHCP Implement 目录 下面介绍建立一个简单的DHCP服务器,主要用于对基本的DHCP请求进行响应,目前只提供一个IP为客户端使用,实现最基本的通信示例。理论内容可参考 DHCP 理论部分。 1 DHCP 服务器建立过程 首先是基本服务器的建立,这个服务器实现了最基本的 ...
分类:
编程语言 时间:
2017-12-30 15:59:56
阅读次数:
246
BOOTP实现 / BOOTP Implement 目录 Note: 理论部分请参考文末相关阅读链接 1 BOOTP 的服务器建立过程 服务器建立步骤主要有: (1) 设定服务器IP,传送ip(offer_ip),服务端口68,客户端口67; (2) 建立send_socket/UDP,广播模式允许 ...
分类:
编程语言 时间:
2017-12-30 15:53:50
阅读次数:
213
Implement pow(x, n). // /**// * @param {number} x// * @param {number} n// * @return {number}// */// var myPow = function (x, n) {// return Math.pow(x,... ...
分类:
其他好文 时间:
2017-12-30 00:23:17
阅读次数:
124
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below ...
分类:
其他好文 时间:
2017-12-26 14:34:27
阅读次数:
148
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib ...
分类:
其他好文 时间:
2017-12-25 15:39:20
阅读次数:
171