
LeetCode
文章平均质量分 85
Fanstorm丶
毕业于南京邮电大学,计算机科学与技术专业。熟悉.net/.net core / wpf /react-native / vue 等,有10年长期写作经验。
展开
-
LeetCode 16. 3Sum Closest, 最接近的三数之和 ,C#
前言 本文介绍了 LeetCode 第 16 题 , “3Sum Closest”, 也就是 “最接近的三数之和” 的问题. 本文使用 C# 语言完成题目,介绍了1种方法供大家参考。 题目 English LeetCode 16. 3Sum Closest Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to原创 2020-05-20 08:38:32 · 617 阅读 · 0 评论 -
LeetCode 15. 3Sum, 三数之和 ,C#
前言 本文介绍了 LeetCode 第 15 题 , “3Sum”, 也就是 “三数之和” 的问题. 本文使用 C# 语言完成题目,介绍了2种方法供大家参考。 题目 English LeetCode 15. 3Sum Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives th原创 2020-05-19 08:19:46 · 1083 阅读 · 0 评论 -
LeetCode 14.Longest Common Prefix , 最长公共前缀 ,C#
前言 本文介绍了 LeetCode 第 14 题 , "Longest Common Prefix ", 也就是 “最长公共前缀” 的问题. 本文使用 C# 语言完成题目,介绍了1种方法供大家参考。 题目 English LeetCode 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common p原创 2020-05-15 13:09:42 · 483 阅读 · 0 评论 -
LeetCode 13. Roman to Integer, 罗马数字转整数 ,C#
前言 本文介绍了 LeetCode 第 13 题 , “Roman to Integer”, 也就是 “罗马数字转整数” 的问题. 本文使用 C# 语言完成题目。 题目 English LeetCode 13. Roman to Integer Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5原创 2020-05-15 12:32:37 · 406 阅读 · 0 评论 -
LeetCode 12. Integer to Roman, 整数转罗马数字 ,C#
前言 本文介绍了 LeetCode 第 12 题 , “Integer to Roman”, 也就是 “整数转罗马数字” 的问题. 本文使用 C# 语言完成题目。 题目 English LeetCode 12. Integer to Roman Roman numerals are represented by seven different symbols: I, V, X, L, C...原创 2020-04-22 19:17:42 · 462 阅读 · 0 评论 -
LeetCode 11. Container With Most Water, 盛最多水的容器 ,C#
前言 本文介绍了 LeetCode 第 11 题 , “Container With Most Water”, 也就是 “盛最多水的容器” 的问题. 本文使用 C# 语言完成题目。 题目 English LeetCode 11. Container With Most Water Given n non-negative integers a1, a2, …, an , where each re...原创 2020-04-16 20:38:08 · 379 阅读 · 0 评论 -
LeetCode 10. Regular Expression Matching, 正则表达式匹配 ,C#
前言 本文介绍了 LeetCode 第 10 题 , “Regular Expression Matching”, 也就是 “正则表达式匹配” 的问题. 本文使用 C# 语言完成题目,介绍了3种方法供大家参考,分别为 分段匹配法,回溯法,动态规划法。 题目 English LeetCode 10. Regular Expression Matching Given an input string ...原创 2020-04-16 00:16:39 · 563 阅读 · 0 评论 -
LeetCode 9. Palindrome Number, 回文数 ,C#
前言 本文介绍了 LeetCode 第 9 题 , “Palindrome Number”, 也就是 “回文数” 的问题. 本文使用 C# 语言完成题目,介绍了2种方法供大家参考。 题目 English LeetCode 9. Palindrome Number Determine whether an integer is a palindrome. An integer is&nbs...原创 2020-04-04 22:44:50 · 414 阅读 · 0 评论 -
LeetCode 8. String to Integer (atoi), 字符串转换整数 (atoi) , C#
前言 本文介绍了 LeetCode 第 8 题 , “String to Integer (atoi)”, 也就是 “字符串转换整数 (atoi)” 的问题. 本文使用 C# 语言完成题目,介绍了2种方法供大家参考。 其中 方法二 参考了官方解法,并进行了一定程度的优化。 题目 English LeetCode 8. String to Integer (atoi) Implement atoi ...原创 2020-04-04 20:44:24 · 399 阅读 · 0 评论 -
LeetCode 7. Reverse Integer , 整数反转 , C#
前言 本文介绍了 LeetCode 第 7 题 , “Reverse Integer”, 也就是 “整数反转” 的问题. 本文使用 C# 语言完成题目,介绍了多种方法供大家参考。 题目 English LeetCode 7. Reverse Integer Given a 32-bit signed integer, reverse digits of an integer. Example 1:...原创 2020-04-03 19:55:33 · 409 阅读 · 0 评论 -
LeetCode 6. ZigZag Conversion , Z 字形变换 C#
前言 本文介绍了 LeetCode 第 6 题 , “ZigZag Conversion”, 也就是 “Z 字形变换” 的问题. 本文使用 C# 语言完成题目,介绍了多种方法供大家参考。 题目 English LeetCode 6. ZigZag Conversion The string “PAYPALISHIRING” is written in a zigzag pattern on a ...原创 2020-03-02 00:02:09 · 725 阅读 · 0 评论 -
LeetCode 5. Longest Palindromic Substring 最长回文子串 C#
前言 本文介绍了 LeetCode 第 5 题 , “Longest Palindromic Substring”, 也就是 “最长回文子串” 的问题. 本文使用 C# 语言完成题目,介绍了 中心扩展法、马拉车算法 等 多种方法供大家参考。 题目 English LeetCode 5. Longest Palindromic Substring Given a string s, find th...原创 2020-02-28 00:26:36 · 530 阅读 · 0 评论 -
LeetCode 4. Median of Two Sorted Arrays 寻找两个有序数组的中位数 C#
前言 本文介绍了 LeetCode 第 4 题 , “Median of Two Sorted Arrays”, 也就是 “寻找两个有序数组的中位数” 的问题. 本文使用 C# 语言完成题目,介绍了多种方法供大家参考。 题目 English LeetCode 4. Median of Two Sorted Arrays There are two sorted arrays nums1 and n...原创 2020-02-21 00:16:04 · 638 阅读 · 0 评论 -
LeetCode 3. Longest Substring Without Repeating Characters 无重复字符的最长子串 C#
前言 本文介绍了 LeetCode 第 3 题 , “Longest Substring Without Repeating Characters”, 也就是 “无重复字符的最长子串” 的问题. 本文使用 C# 语言完成题目,用到了 C# 的哈希表 HashSet 和 Dictionary ( 不用 HashTable 而是使用 Dictionary,官方推荐使用 Dictionary,详情见 h...原创 2020-02-16 14:42:06 · 342 阅读 · 0 评论 -
LeetCode 2. Add Tow Numbers 两数相加 C#
前言 本文介绍了 LeetCode 第 2 题 , “Add Tow Numbers”, 也就是 “两数相加” 的问题. 本文使用 C# 语言完成题目。 题目 English LeetCode 2. Add Tow Numbers You are given two non-empty linked lists representing two non-negative integers. The...原创 2020-02-15 00:50:17 · 412 阅读 · 0 评论 -
LeetCode 1. Two Sum 两数之和,C# 哈希表 Dictionary
前言 本文介绍了 LeetCode 第 1 题 , “Two Sum”, 也就是 “两数之和” 的问题. 本文使用 C# 语言完成题目,并介绍了 C# 的哈希表 “Dictionary” . 题目 LeetCode 1. Two Sum Given an array of integers, return indices of the two numbers such that they add ...原创 2020-02-14 22:46:09 · 627 阅读 · 0 评论