JTDI / leetcode-practice

Record the results of our efforts
6 stars 3 forks source link

【讨论】每日一题 #1

Closed luchaohai closed 4 years ago

luchaohai commented 4 years ago

demo 请注明 题目名称(方便大家查找) 题解有疑问,可以在这里回复或者 直接在对应的题解里进行回复讨论 希望大家对于觉得写的不错的题解,积极地点赞👍

202.快乐数 https://leetcode-cn.com/problems/happy-number/solution/kuai-le-shu-ku-xing-seng-by-kuxingseng/

notmaster commented 4 years ago

1.两数之和(简单) https://leetcode-cn.com/problems/two-sum/solution/1liang-shu-zhi-he-by-notmaster/ 备注:久闻 leetcode 大名,但是今天才正式使用,所以还花了一点时间研究软件本身,先立个目标,训练营期间计划每天一题。因为本题难度简单,所以实际上还做了第二题【两数相加(中等)】,第二题难度增加不少,本地调试能过,提交老是过不了,准备研学习下其他人的多种解法后再写题解。

lyn-ho commented 4 years ago

3.无重复字符的最长子串

无重复字符的最长子串

ps: 一个小技巧, 使用 LeetCode vscode 插件进行刷题

luchaohai commented 4 years ago

258.各位相加 https://leetcode-cn.com/problems/add-digits/solution/258ge-wei-xiang-jia-ku-xing-seng-by-kuxingseng/

lyn-ho commented 4 years ago

167.两数之和-ii-输入有序数组

167.two-sum-ii-input-array-is-sorted

two-sum-ii-input-array-is-sorted

WALLE729 commented 4 years ago

【1】两数之和 解题思路: 利用两次循环,拿出数组的一项,和数组的其余项求和,再和目标值对比 个人感受是比较通俗的解法,肯定也不是最优答案 需要花时间了解一下时间复杂度,空间复杂度,找到性能最好的解法 https://leetcode-cn.com/problems/two-sum/solution/1-liang-shu-zhi-he-walle-algorithm-journey-by-xiao/ 刚开始接触算法领域,望各位大佬多多指教

WALLE729 commented 4 years ago

【7】整数反转 https://leetcode-cn.com/problems/reverse-integer/solution/7-zheng-shu-fan-zhuan-by-xiao-guai-shou-zhang-yi-d/

notmaster commented 4 years ago

2. 两数相加

主要是理解链表,参考文章推荐:

解题: https://leetcode-cn.com/problems/add-two-numbers/solution/2-liang-shu-xiang-jia-li-jie-lian-biao-notmaster-b/

SwimmerRcd commented 4 years ago

100.相同的树 用于训练深度优先算法(DFS),DFS算法可用于树/图等数据结构的遍历 https://leetcode-cn.com/problems/same-tree/solution/xiang-tong-de-shu-dfsjie-fa-shi-zhan-by-mi-le-qiu-/

WALLE729 commented 4 years ago

【14】取最长公共前缀 https://leetcode-cn.com/problems/longest-common-prefix/solution/14-zui-chang-gong-gong-qian-zhui-by-xiao-guai-shou/

notmaster commented 4 years ago

3.无重复字符的最长子串

https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/solution/3wu-zhong-fu-zi-fu-de-zui-chang-zi-chuan-notmaster/

luchaohai commented 4 years ago

1.两数之和 哈希表 https://leetcode-cn.com/problems/two-sum/solution/1liang-shu-zhi-he-ku-xing-seng-by-kuxingseng/

notmaster commented 4 years ago

7. 整数反转

https://leetcode-cn.com/problems/reverse-integer/solution/7-zheng-shu-fan-zhuan-notmaster-by-notmaster/

notmaster commented 4 years ago

35.搜索插入位置 二分法 https://www.notion.so/35-05e3437b64a0404baaa5f5ad310384a5

luchaohai commented 4 years ago

v1.1版运营结束