
【LeetCode】修炼之路
文章平均质量分 90
Mark White
这个作者很懒,什么都没留下…
展开
-
【LeetCode】修炼之路-0008- String to Integer (atoi)【python】
其实题目已经说了如何实现了,我们按照给定的思路实现即可。原创 2024-10-26 19:45:27 · 670 阅读 · 0 评论 -
【LeetCode】修炼之路-0007- Reverse Integer (整数反转)【python】
Assume the environment does not allow you to store 64-bit integers (signed or unsigned).Example 1:Example 2:Example 3:Constraints:-231原创 2024-10-25 14:55:53 · 927 阅读 · 0 评论 -
【LeetCode】修炼之路-0006-Zigzag Conversion (Z 字形变换)【python】
列表生成式属于可以体现the zen of python的特性之一,理解好列表生成式,用好列表生成式,可以让你的代码更清晰,建议多看,多练习,掌握列表生成式的使用方法,可以让你的代码更紧凑,可读性更好,代码更优雅。原创 2024-10-24 22:31:46 · 1106 阅读 · 0 评论 -
【LeetCode】修炼之路-0005-Longest Palindromic Substring【python】
首先,题目我们就看不懂 ,上网冲浪一下发现,是最长回文字串的意思,就是从左右对称的一个数组。原创 2024-10-11 23:48:39 · 719 阅读 · 0 评论 -
【LeetCode】修炼之路-0004-Median of Two Sorted Arrays【python】
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.The overall run time complexity should be O(log (m+n)).Example 1:Input: nums1 = [1,3], nums2 = [2]Output: 2.00000Explanation: merged array =原创 2024-10-09 23:45:28 · 1026 阅读 · 0 评论 -
【LeetCode】修炼之路-0003-longest-substring-without-repeating-characters(无重复字符的最长子串)【python】【中等】
leetcode 0003 最长无重复字串 python题解原创 2024-04-17 22:49:17 · 1205 阅读 · 1 评论 -
【LeetCode】修炼之路-0002-Add Two Numbers(两数相加)【python】【中等】
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.You may assume the two numbers原创 2024-04-09 17:46:14 · 744 阅读 · 0 评论 -
【LeetCode】修炼之路-0001-Two Sum(两数之和)【python】【简单】
计算机科学作为一门实践性极强的学科,代码能力的培养尤为重要。当前网络上有非常多优秀的前辈分享了LeetCode的最佳算法题解,这对于我们这些初学者来说提供了莫大的帮助,但对于我这种缺乏编程直觉的学习者而言,这往往难以消化吸收。(为什么别人就能想出这么优雅,高级的实现!我就只会暴力呢)我浅薄地认为,只有理解算法设计的思路,才能真正掌握编程技巧。鉴于此,本系列试图呈现另一种LeetCode修炼之路——从基本原理出发,一步步拓展思路,逐级深化难度。原创 2023-12-29 19:56:56 · 1499 阅读 · 0 评论