码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
LeetCode 周赛 184
"第一题" 判断字符串是不是子串,效率高的方式应该是字典树,按照字典序排序后,建树,再建的过程中就可以得到答案。 但是这是比赛中,又是第一题,所以直接用contains了 c "第三题" 很简单的一道字符串替换的题目 ...
分类:其他好文   时间:2020-04-12 14:04:16    阅读次数:73
leetcode 203 移除链表元素
地址:https://leetcode cn.com/problems/remove linked list elements/ 大意:删除链表中等于给定值的所有节点。 ` ` ...
分类:其他好文   时间:2020-04-12 08:20:40    阅读次数:49
leetcode 21 合并两个有序链表
地址:https://leetcode cn.com/problems/merge two sorted lists/ 大意:将两个升序链表合并为一个新的升序链表并返回。 ` ` ...
分类:其他好文   时间:2020-04-12 08:04:53    阅读次数:74
leetcode 2 两数相加
地址:https://leetcode cn.com/problems/add two numbers/submissions/ 大意:给定两个链表,返回一个由这两个链表相加而得到的新链表 ` ` ...
分类:其他好文   时间:2020-04-12 07:53:08    阅读次数:55
leetcode 300 最长上升子序列
地址:https://leetcode cn.com/problems/longest increasing subsequence/ 大意:给定一个数组,找到最长上升子序列 ` ` ...
分类:其他好文   时间:2020-04-12 07:52:21    阅读次数:78
232. 用栈实现队列
地址:https://leetcode-cn.com/problems/implement-queue-using-stacks/ <?php /** 232. 用栈实现队列 使用栈实现队列的下列操作: push(x) -- 将一个元素放入队列的尾部。 pop() -- 从队列首部移除元素。 pee ...
分类:其他好文   时间:2020-04-11 16:56:35    阅读次数:74
【LeetCode-链表】分隔链表
题目描述 给定一个链表和一个特定值 x,对链表进行分隔,使得所有小于 x 的节点都在大于或等于 x 的节点之前。 你应当保留两个分区中每个节点的初始相对位置。 示例: 题目链接: https://leetcode cn.com/problems/partition list/ 思路 x会将链表分割成 ...
分类:其他好文   时间:2020-04-10 21:16:33    阅读次数:69
codeforces#1332F. Independent Set(树上dp)
F. Independent Set 题意: all the vertices in the original graph that are incident on at least one edge in the subgraph.这句话不太理解 edge-induced subgraph(诱导子 ...
分类:其他好文   时间:2020-04-10 21:16:00    阅读次数:92
翻转字符串里的单词
试题地址:https://leetcode-cn.com/problems/reverse-words-in-a-string/ 试题思路: go自带strings.Fields()函数,可以剔除多余空格 试题代码: func reverseWords(s string) string { strL ...
分类:其他好文   时间:2020-04-10 14:45:08    阅读次数:72
【LeetCode链表】删除排序链表中的重复元素 II
题目描述 给定一个排序链表,删除所有含有重复数字的节点,只保留原始链表中 没有重复出现 的数字。 示例: 题目链接 :https://leetcode cn.com/problems/remove duplicates from sorted list ii/ 做这题之前,可以先做 "删除排序链表中 ...
分类:编程语言   时间:2020-04-10 00:36:26    阅读次数:74
6275条   上一页 1 ... 72 73 74 75 76 ... 628 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!