码迷,mamicode.com
首页 >  
搜索关键字:lc    ( 989个结果
[LC] 951. Flip Equivalent Binary Trees
For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip e ...
分类:其他好文   时间:2020-06-08 00:23:38    阅读次数:49
[LC] 752. Open the Lock
You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rota ...
分类:其他好文   时间:2020-06-07 13:04:24    阅读次数:50
[LeetCode] 101. 对称二叉树
这个题真的是lc送给我们的儿童节礼物,简单的甜哈 class Solution { public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) { int max=candies[0]; for(int i=1;i<ca ...
分类:其他好文   时间:2020-06-01 23:56:33    阅读次数:94
LC-741 Cherry Pickup
https://leetcode.com/problems/cherry-pickup/ 给一个N*N的矩阵代表一个果园,1代表有果子,0代表空地,-1代表墙,不可通过 现在要求你从(0,0)点先走到(N-1,N-1)点,只能向下或者向右移动,再从(N-1,N-1)点走回(0,0)点,只能向上或者向 ...
分类:其他好文   时间:2020-06-01 09:12:06    阅读次数:61
LC_560-和为K的连续子数组
题目描述 Created by Edwin Xu on 5/15/2020 11:35 PM 给定一个整数数组和一个整数 k,你需要找到该数组中和为 k 的 连续的子数组的个数。 示例 1 : 输入:nums = [1,1,1], k = 2 输出: 2 , [1,1] 与 [1,1] 为两种不同的 ...
分类:编程语言   时间:2020-05-29 22:55:36    阅读次数:65
docker配置中文字符集
[root@localhost ~]# docker run -it -d centos:7 [root@650da1307bb1 /]# echo $LANG [root@650da1307bb1 /]# locale # 查看当前系统所使用的字符集 LANG= LC_CTYPE="POSIX" ...
分类:其他好文   时间:2020-05-29 20:57:00    阅读次数:247
非递归中序遍历
//非递归中序遍历 //设置一个函数,该函数的作用是深入到最左侧子树但是不遍历 void inOrder_Ii(TreeNode *bt,stack S) { while (bt) { S.push(bt); if(bt->lc) bt = bt->lc; } } void inOrder_I(Tr ...
分类:其他好文   时间:2020-05-26 22:12:11    阅读次数:69
lc 两数相加
链接:https://leetcode-cn.com/problems/add-two-numbers/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * L ...
分类:其他好文   时间:2020-05-25 00:15:00    阅读次数:65
lc 排序链表
链接:https://leetcode-cn.com/problems/sort-list/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNod ...
分类:编程语言   时间:2020-05-24 23:59:47    阅读次数:102
lc 反转链表
链接:https://leetcode-cn.com/problems/reverse-linked-list/ 代码: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; ...
分类:其他好文   时间:2020-05-24 23:53:03    阅读次数:71
989条   上一页 1 ... 5 6 7 8 9 ... 99 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!