LeetCode
文章平均质量分 74
JuzerTech
这个作者很懒,什么都没留下…
展开
-
LeetCode (力扣) 23. Merge k Sorted Lists (C) - Hard
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。这题是 LeetCode 21. Merge Two Sorted Lists 的延伸,把两个链表 ( Linked List ) 增加到多个。把多个链表 ( Linked List ) 依照大小排序,串接在一起,并回传串接完的 Linked List。题目与范例如下You are given an array of k linked-lists lists, each linked-list i..原创 2021-06-24 01:15:26 · 132 阅读 · 0 评论 -
LeetCode (力扣) 22. Generate Parentheses (C) - Medium
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定一个数字 n ,列出 n 组 ( ) 的所有排列方式。题目与范例如下Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.Example 1:Input: n = 3Output: ["((()))","(()())","(())()...原创 2021-06-22 11:19:15 · 183 阅读 · 0 评论 -
LeetCode (力扣) 21. Merge Two Sorted Lists (C) - Easy
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。此题测验的是链表 ( Linked List ) ,把两个 Linked List 依照大小排序,串接在一起,并回传串接完的 Linked List。...原创 2021-06-21 12:58:56 · 80 阅读 · 0 评论 -
LeetCode (力扣) 20. Valid Parentheses (C) - Easy
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-18 22:55:02 · 144 阅读 · 3 评论 -
LeetCode (力扣) 19. Remove Nth Node From End of List (C) - Medium
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-18 12:09:16 · 70 阅读 · 0 评论 -
LeetCode (力扣) 18. 4Sum (C) - Medium (双指针法、搜寻法)
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-18 01:21:10 · 121 阅读 · 0 评论 -
LeetCode (力扣) 17. Letter Combinations of a Phon (C) - Medium (递归法)
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-17 10:17:44 · 113 阅读 · 0 评论 -
LeetCode (力扣) 16. 3Sum Closest (C) - Medium 暴力解、双指标( Merge Sort )、双指标( Quick Sort )
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-15 17:11:31 · 121 阅读 · 0 评论 -
LeetCode (力扣) 15. 3Sum (C) - Medium ( 排序+搜寻法 )
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-14 19:04:55 · 134 阅读 · 1 评论 -
LeetCode (力扣) 14. Longest Common Prefix (C) - Easy
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-12 19:58:21 · 87 阅读 · 0 评论 -
LeetCode (力扣) 13. Roman to Integer ( C ) - Easy- 暴力解
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-12 19:53:01 · 62 阅读 · 0 评论 -
LeetCode (力扣) 12. Integer to Roman ( C ) - Medium - 暴力解
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-11 22:32:37 · 127 阅读 · 2 评论 -
LeetCode (力扣) 11. Container With Most Water ( C ) - Medium - 双指针法
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-08 00:24:06 · 106 阅读 · 0 评论 -
LeetCode (力扣) 10. Regular Expression Matching ( C ) - Hard - 递归法
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-06 23:23:54 · 199 阅读 · 1 评论 -
LeetCode (力扣) 9. Palindrome Number ( C ) - Easy
同步发于JuzerTech网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。原创 2021-06-06 23:02:39 · 90 阅读 · 0 评论 -
LeetCode (力扣) 8. String to Integer (atoi) ( C ) - Medium
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定一个字符串,把它转换成整数型态,复现 C语言中的 atoi() 函数。这题的测资有点复杂,要考虑的情况有点多。题目与范例如下Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function).The .原创 2021-05-31 18:49:01 · 107 阅读 · 0 评论 -
LeetCode 7. Reverse Integer ( C ) - Easy
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定一个整数 ( INT ) ,反转此整数 ( INT )。题目与范例如下Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1].原创 2021-05-25 13:19:21 · 86 阅读 · 0 评论 -
LeetCode 6. ZigZag Conversion ( C ) - Medium
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定一个字符串,把该字符串照 zigzag pattern (锯齿型) 排列,如下图所示依照红色箭头依序排列,此图假设 Row 为 4,并依照排序后的每一行 ( Row ) 字符输出,可以参考下方题目原文的范例。题目与范例如下The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows l..原创 2021-05-05 15:56:18 · 71 阅读 · 0 评论 -
LeetCode 5. Longest Palindromic Substring ( C ) - Medium
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定一个字符串,请撰写一个代码,回传此字符串中最长的回文。题目与范例如下Given a strings, returnthe longest palindromic substringins.Example 1:Input: s = "babad"Output: "bab"Note: "aba" is also a valid answer.Example 2:...原创 2021-05-03 20:51:28 · 103 阅读 · 0 评论 -
LeetCode 4. Median of Two Sorted Arrays ( C ) - Hard 快速解
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定两个已排序之整数数组,请撰写程式回传两数组的中位数,如中位数有两个则回传两者之平均值。题目与范例如下Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.Example 1:Input: nums1 = [1,3],.原创 2021-04-24 23:35:12 · 122 阅读 · 0 评论 -
LeetCode 3. Longest Substring Without Repeating Characters ( C ) 最短代码
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为给定一个字符串,寻找其中最长的子字符串,并且此子字符串不得有重复之字符。题目与范例如下Given a string s, find the length of the longest substring without repeating characters.Example 1:Input: s = "abcabcbb"Output: 3Explanation: The answer is原创 2021-04-22 23:08:38 · 103 阅读 · 0 评论 -
LeetCode 2. Add Two Numbers ( C ++ )
题目为给定两个链表 ( Link List ),进行加法,回传他们计算后的值(同样以链表( Link List ) 回传),数字由左而右依序进位。题目如下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 .原创 2021-04-21 14:39:18 · 58 阅读 · 0 评论 -
LeetCode 1. Two Sum C 语言解题
同步发于 JuzerTech 网站,里面有我软、硬件学习的纪录与科技产品开箱,欢迎进去观看。题目为输入一串数列,要寻找两个数字相加与目标值相同的数,并回传它们的位置。原文题目如下Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.You may assume that each input woul原创 2021-04-21 12:22:15 · 162 阅读 · 0 评论