数据结构
偷吃了老鼠的土豆
戒骄戒躁,脚踏实地,坚持不懈,愈挫愈勇。
展开
-
c++检查IP地址是否合法
问题描述:给你一个IP地址,判断她是否合法;也就是说判断ip地址的每一个数都在[0,255];解题思路:思路1;从头开始扫描IP地址,将每一段都转换成数字,当遇到'.' 或者‘\n’的时候判断数字是否合法;代码如下:#include <iostream>#include <stdio.h>#include <stdlib.h>#include <string.h>using namespace std;int main原创 2020-09-20 16:31:46 · 1181 阅读 · 0 评论 -
Okabe and Boxes(栈)
题目:Okabe and Super Hacker Daru are stacking and removing boxes. There are n boxes numbered from 1 to n. Initially there are no boxes on the stack.Okabe, being a control freak, gives Daru 2n comman...原创 2018-07-23 22:24:15 · 393 阅读 · 0 评论 -
tree_recovery(递归)poj2255
题目:http://poj.org/problem?id=2255题目:Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. ...原创 2018-08-10 20:35:53 · 146 阅读 · 0 评论