- 博客(4)
- 问答 (1)
- 收藏
- 关注
原创 leetcode(4)
1,给定一个二叉树,返回它的中序 遍历。 示例: 输入: [1,null,2,3] 1 2 / 3 输出: [1,3,2] /** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *righ...
2019-02-14 21:48:49 87
原创 leetcode(3)哈希简单模式
1.给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 示例: 给定 nums = [2, 7, 11, 15], target = 9 因为 nums[0] + nums[1] = 2 + 7 = 9 所以返回 [0, 1] int* twoS...
2019-02-13 21:21:30 110
原创 leetcode(2)
翻转链表 1.迭代 if(!head) return NULL; struct ListNode *p = head, *newHead = head; while(head->next){ p = head->next; head->next = p->next; p->next = newHead; newHead = ...
2019-02-13 19:15:14 99
原创 LeetCode(1)翻转数字
给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。 示例 1: 输入: 123 输出: 321 示例 2: 输入: -123 输出: -321 示例 3: 输入: 120 输出: 21 注意: 假设我们的环境只能存储得下 32 位的有符号整数,则其数值范围为 [−231, 231 − 1]。请根据这个假设,如果反转后整数溢出那么就返回 0。 int reverse(int...
2019-02-12 19:19:31 190
空空如也
构建cycleGAN严重问题
2019-07-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人