摘要:
Leetcode23:Merge k Sorted Listsleetcode java 1. 题目描述Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 把K个已经排序的链表合并到一起并返回它的链表头,分析并描述它的复杂度。 2. 解题思路这道题... 阅读全文
摘要:
1.题目描述 2.解题思路 3.代码实现 1.题目描述 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer 阅读全文
摘要:
3sum问题 leetcode java 1.问题描述 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the a 阅读全文
摘要:
Longest Common Prefix问题leetcodejava 1.问题描述Write a function to find the longest common prefix string amongst an array of strings.题目翻译:写一个函数,找到一个String数组中各个字符串的最长公共前缀。 2.解题思路这道题的难度是easy,确实解题思路也比较直观,首... 阅读全文
摘要:
Roman to Integer问题leetcodejavatitle: 1.问题描述Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.{"","I","II","III","IV","V","VI","VII","VIII","IX... 阅读全文
摘要:
Integer to Roman 问题leetcodejava 1.问题描述Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.题目翻译:把给定的一个整数翻译成罗马数字,这个整数限定在1到3999范围内。 2.解题思路这道题给的范围很... 阅读全文
摘要:
Container With Most Water问题leetcodejavadp 1.问题描述Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo... 阅读全文
摘要:
Sudoku Solver问题leetcodejava递归 1. 问题描述Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one uni... 阅读全文
摘要:
Search in a Rotated Array问题 leetcode java 二分查找 1.问题描述 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. ( 阅读全文