上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 76 下一页
摘要: Given a binary search tree with non negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 O 阅读全文
posted @ 2018-09-26 15:36 bernieloveslife 阅读(82) 评论(0) 推荐(0) 编辑
摘要: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non white 阅读全文
posted @ 2018-09-26 15:13 bernieloveslife 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Example 2: Example 3: 阅读全文
posted @ 2018-09-26 14:20 bernieloveslife 阅读(103) 评论(0) 推荐(0) 编辑
摘要: In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the height of any n 阅读全文
posted @ 2018-09-25 16:52 bernieloveslife 阅读(125) 评论(0) 推荐(0) 编辑
摘要: You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of ston 阅读全文
posted @ 2018-09-25 16:39 bernieloveslife 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Example 2: Example 3: 阅读全文
posted @ 2018-09-25 16:28 bernieloveslife 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a 32 bit signed integer, reverse digits of an integer. Note: Assume we are dealing with an environment which could only store integers within th 阅读全文
posted @ 2018-09-25 16:10 bernieloveslife 阅读(83) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2018-09-25 15:41 bernieloveslife 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Description 用顺序存储实现二叉树。读入一棵二叉树,输出后序遍历的结果。 Input Format 第一行,一个整数 n,表示这棵树有 n 个节点。这 n 个节点编号为 1 到 n。 接下来 n 行,描述每个节点的左右儿子情况。每行包含三个整数 x y z,表示编号为 x 的节点的左儿子编 阅读全文
posted @ 2017-12-16 14:40 bernieloveslife 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Description 给出一棵二叉树,求它的层次遍历结果。 [二叉树的遍历问题是一种精神,务必领会] Input Format 第一行,N<1000000,表示二叉树节点数。 默认序号为0的节点为树根。接下来共N-1行,依次表示序号为1,...,N-1的节点的父亲节点序号。 如果一个节点有两个孩子 阅读全文
posted @ 2017-12-16 14:40 bernieloveslife 阅读(396) 评论(0) 推荐(0) 编辑
上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 76 下一页