码迷,mamicode.com
首页 >  
搜索关键字:leetcode 19    ( 34993个结果
242. 有效的字母异位词
题目描述 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 说明: 你可以假设字符串只包含小写字母。 原题请参考链接https://leetcode-cn.com/problems/valid-anagram/ 题解 方法一?【排序】 class Solution: ...
分类:其他好文   时间:2021-02-22 12:20:42    阅读次数:0
leetcode 743 网络延迟时间 Dijkstra算法
JAVA 暴力解法: public final int networkDelayTime(int[][] times, int n, int k) { Map<Integer, List<Integer[]>> map = new HashMap<Integer, List<Integer[]>>( ...
分类:编程语言   时间:2021-02-22 12:12:04    阅读次数:0
leetcode--1004最大连续1的个数 III
1.第一题就给我整蒙了 1.1我的思路,看能不能获取到一个列表的(里面全是0,1)的最大连续长度 def get_max_one(A): A = [str(i) for i in A] s1 = ''.join(A) #我想把列表变成字符串,然后按0 split ,列表里必须都是字符串 A = s1 ...
分类:其他好文   时间:2021-02-20 12:40:12    阅读次数:0
LeetCode - Unique Binary Search Trees
Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Examp ...
分类:其他好文   时间:2021-02-20 12:13:36    阅读次数:0
leetCode第一题
题目描述: 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。 示例: 给定 nums = [2, 7, 11, 15], target = 9 因为 ...
分类:其他好文   时间:2021-02-19 13:36:23    阅读次数:0
leetcode_396. 旋转函数
给定一个长度为 n 的整数数组 A 。 假设 Bk 是数组 A 顺时针旋转 k 个位置后的数组,我们定义 A 的“旋转函数” F 为: F(k) = 0 * Bk[0] + 1 * Bk[1] + ... + (n-1) * Bk[n-1]。 计算F(0), F(1), ..., F(n-1)中的最 ...
分类:其他好文   时间:2021-02-19 13:03:58    阅读次数:0
[LeetCode452]用最少数量的箭引爆气球
链接:https://leetcode-cn.com/problems/minimum-number-of-arrows-to-burst-balloons discription: 在二维空间中有许多球形的气球。对于每个气球,提供的输入是水平方向上,气球直径的开始和结束坐标。由于它是水平的,所以纵 ...
分类:其他好文   时间:2021-02-18 13:34:55    阅读次数:0
[LeetCode] 1031. Maximum Sum of Two Non-Overlapping Subarrays 两个不重叠的子数组的最大和
Given an array of non negative integers, return the maximum sum of elements in two non overlapping (contiguous) subarrays, which have lengths and . (F ...
分类:移动开发   时间:2021-02-18 12:53:23    阅读次数:0
leetcode 82 删除排序列表中重复元素
没啥太难的思路,代码如下: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * List ...
分类:编程语言   时间:2021-02-18 12:53:10    阅读次数:0
LeetCode 数据库之组合两个表
1. 题目 表1: Person ± ± +| 列名 | 类型 |± ± +| PersonId | int || FirstName | varchar || LastName | varchar |± ± +PersonId 是上表主键表2: Address ± ± +| 列名 | 类型 |± ...
分类:数据库   时间:2021-02-17 15:09:12    阅读次数:0
34993条   上一页 1 ... 32 33 34 35 36 ... 3500 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!