码迷,mamicode.com
首页 >  
搜索关键字:unique paths ii    ( 12050个结果
JS 数组去重
function unique (arr) { return Array.from(new Set(arr)) } var arr = [1,1,'true','true',true,true,15,15,false,false, undefined,undefined, null,null, Na ...
分类:编程语言   时间:2020-03-20 00:59:21    阅读次数:71
刷题142. Linked List Cycle II
一、题目说明 题目142. Linked List Cycle II,判断一个链表是否有环,如果有返回环的第一个元素,否则返回NULL。 这个题目是 141. Linked List Cycle 的升级版本,难度是Medium! 二、我的解答 最直观的解答就是用一个unordered_map dp来 ...
分类:其他好文   时间:2020-03-19 21:52:56    阅读次数:71
python 将所有str数字改为int数字
a=["a","b","1","89","56","c"]foriinrange(len(a)):#获取列表长度以便索引foriiinrange(999):#定义数字最大数ifa[i]==str(ii):a[i]=int(a[i])print(a)
分类:编程语言   时间:2020-03-19 16:33:43    阅读次数:91
52. N皇后 II
思路跟51题一模一样 1 class Solution 2 { 3 vector<vector<string>> res; 4 vector<string> temp;//临时路径 5 vector<bool> col,m,s;//列,主对角线,副对角线 6 int n; 7 public: 8 i ...
分类:其他好文   时间:2020-03-18 23:52:55    阅读次数:58
[LeetCode] 940. Distinct Subsequences II
Given a string S, count the number of distinct, non-empty subsequences of S . Since the result may be large, return the answer modulo 10^9 + 7. Exampl ...
分类:其他好文   时间:2020-03-18 09:38:23    阅读次数:52
面试题59 - II.:队列的最大值(C++)
题目地址:https://leetcode-cn.com/problems/dui-lie-de-zui-da-zhi-lcof/ 题目描述 请定义一个队列并实现函数 max_value 得到队列里的最大值,要求函数max_value、push_back 和 pop_front 的均摊时间复杂度都是 ...
分类:编程语言   时间:2020-03-18 09:18:46    阅读次数:69
sqlserver如何判断某字段做唯一索引,而且是单独
IF ( SELECT COUNT(*) FROM sys.index_columns INNER JOIN sys.indexes ON indexes.index_id = index_columns.index_id AND indexes.object_id = index_columns. ...
分类:数据库   时间:2020-03-18 09:16:58    阅读次数:83
40. 组合总和 II
1 class Solution 2 { 3 vector<vector<int>> res; 4 int sum = 0; 5 public: 6 void helper(vector<int>& nums, int start,int target, vector<int>& out) 7 { ...
分类:其他好文   时间:2020-03-17 23:55:47    阅读次数:93
数据库约束
1 约束种类 约束名 | 约束关键字 : :|: : 主键|primary key 唯一|unique 非空|not null 外键|foreign key 检查约束|mysql不支持 2 主键约束 通常不使用业务字段(身份证,学号)作为主键,单独使用一个id作为主键,可以没意义,只要唯一,非空就行 ...
分类:数据库   时间:2020-03-16 09:16:30    阅读次数:88
LeetCode——best-time-to-buy-and-sell-stock i-ii-iii
Q:假设你有一个数组,其中第i个元素是某只股票在第i天的价格。 如果你最多只能完成一笔交易(即买一股和卖一股股票),设计一个算法来求最大利润。 A:当前值比最小值小,代替最小值;当前值比最小值大,计算差值,和之前的差值做判断。 Q:假设你有一个数组,其中第i个元素表示某只股票在第i天的价格。 设计一 ...
分类:其他好文   时间:2020-03-15 22:02:24    阅读次数:46
12050条   上一页 1 ... 75 76 77 78 79 ... 1205 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!