码迷,mamicode.com
首页 >  
搜索关键字:leetcode happy numbe    ( 36157个结果)
【leetcode】重新排列数组
int* shuffle(int* nums, int numsSize, int n, int* returnSize){ int* arr = (int*)calloc(numsSize, sizeof(int)); int pst = 0; for (int i = 0; i < numsSi ...
分类:编程语言   时间:2020-09-17 15:41:19    阅读次数:21
【leetcode】按奇偶排序数组 II
int* sortArrayByParityII(int* A, int ASize, int* returnSize){ int* arr = (int*)calloc(ASize,sizeof(int)); int evenindex = 0; int oddindex = 1; for (in ...
分类:编程语言   时间:2020-09-17 15:33:05    阅读次数:32
每日一道 LeetCode (36):相交链表
每天 3 分钟,走上算法的逆袭之路。 前文合集 每日一道 LeetCode 前文合集 代码仓库 GitHub: https://github.com/meteor1993/LeetCode Gitee: https://gitee.com/inwsy/LeetCode 题目:最小栈 题目来源:htt ...
分类:其他好文   时间:2020-09-17 12:38:20    阅读次数:21
Leetcode 621之任务调度器
title: Leetcode 621 之任务调度器 date: 2020-9-2 22:47:12 categories: LeetCode 这里参考popopop的解法,主要的是要记住下面这张图 流程: 先使用一个int[] 数组记录一下各个任务的出现次数; 然后遍历这个数组,找到出现次数最多的 ...
分类:其他好文   时间:2020-09-16 12:28:41    阅读次数:34
删除链表中的元素
/** * https://leetcode-cn.com/problems/remove-linked-list-elements/ * 删除链表中等于给定值 val 的所有节点。 * * 输入: 1->2->6->3->4->5->6, val = 6 * 输出: 1->2->3->4->5 * ...
分类:其他好文   时间:2020-09-16 12:24:18    阅读次数:32
判断B是 A的子树
解析:https://leetcode-cn.com/problems/shu-de-zi-jie-gou-lcof/solution/mian-shi-ti-26-shu-de-zi-jie-gou-xian-xu-bian-li-p/ bool isSubStructure(TreeNode* ...
分类:其他好文   时间:2020-09-16 12:19:57    阅读次数:34
【LeetCode-字符串】简化路径
题目描述 以 Unix 风格给出一个文件的绝对路径,你需要简化它。或者换句话说,将其转换为规范路径。 在 Unix 风格的文件系统中,一个点(.)表示当前目录本身;此外,两个点 (..) 表示将目录切换到上一级(指向父目录);两者都可以是复杂相对路径的组成部分。 请注意,返回的规范路径必须始终以斜杠 ...
分类:其他好文   时间:2020-09-14 18:50:35    阅读次数:35
LeetCode 95 | 构造出所有二叉搜索树
今天是LeetCode专题第61篇文章,我们一起来看的是LeetCode95题,Unique Binary Search Trees II(不同的二叉搜索树II)。 这道题的官方难度是Medium,点赞2298,反对160,通过率40.5%。我也仿照steam当中游戏评论的分级,给LeetCode中 ...
分类:其他好文   时间:2020-09-14 18:50:19    阅读次数:39
LeetCode 150. 逆波兰表达式求值
题目描述链接:https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/ 解题思路:栈的典型应用,并注意减法和除法不满足交换率。 LeetCode C++求解代码: class Solution { public: stack ...
分类:其他好文   时间:2020-09-11 14:15:45    阅读次数:42
每日一道 LeetCode (32): 验证回文串
每天 3 分钟,走上算法的逆袭之路。 前文合集 每日一道 LeetCode 前文合集 代码仓库 GitHub: https://github.com/meteor1993/LeetCode Gitee: https://gitee.com/inwsy/LeetCode 题目:验证回文串 题目来源:h ...
分类:其他好文   时间:2020-09-10 23:07:21    阅读次数:43
共36157条   上一页 1 ... 76 77 78 79 80 ... 3616 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!