随笔分类 -  Leetcode (Java)

上一页 1 2 3 4 5 下一页

30. Substring with Concatenation of All Words (JAVA)
摘要:You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca 阅读全文

posted @ 2019-04-30 17:38 joannae 阅读(124) 评论(0) 推荐(0)

29. Divide Two Integers (JAVA)
摘要:Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividi 阅读全文

posted @ 2019-04-28 11:31 joannae 阅读(225) 评论(0) 推荐(0)

23. Merge k Sorted Lists (JAVA)
摘要:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 阅读全文

posted @ 2019-04-27 11:28 joannae 阅读(123) 评论(0) 推荐(0)

25. Reverse Nodes in k-Group (JAVA)
摘要: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 and is less than or equal to 阅读全文

posted @ 2019-04-26 18:29 joannae 阅读(119) 评论(0) 推荐(0)

20. Valid Parentheses (JAVA)
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文

posted @ 2019-04-26 17:01 joannae 阅读(152) 评论(0) 推荐(0)

19. Remove Nth Node From End of List (JAVA)
摘要:Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After removi 阅读全文

posted @ 2019-04-26 16:36 joannae 阅读(104) 评论(0) 推荐(0)

18. 4Sum (JAVA)
摘要:Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c+ d = target? Find all unique qu 阅读全文

posted @ 2019-04-26 16:07 joannae 阅读(202) 评论(0) 推荐(0)

16. 3Sum Closest (JAVA)
摘要:Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the thr 阅读全文

posted @ 2019-04-25 22:51 joannae 阅读(112) 评论(0) 推荐(0)

15. 3Sum (JAVA)
摘要:Given an array nums of n integers, are there elements a, b, cin nums such that a + b + c = 0? Find all unique triplets in the array which gives the su 阅读全文

posted @ 2019-04-25 19:04 joannae 阅读(155) 评论(0) 推荐(0)

13. Roman to Integer (JAVA)
摘要:Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, just two one's 阅读全文

posted @ 2019-04-25 16:20 joannae 阅读(153) 评论(0) 推荐(0)

12. Integer to Roman (JAVA)
摘要:Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, just two one's 阅读全文

posted @ 2019-04-25 15:47 joannae 阅读(235) 评论(0) 推荐(0)

11. Container With Most Water (JAVA)
摘要: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 endp 阅读全文

posted @ 2019-04-25 15:20 joannae 阅读(150) 评论(0) 推荐(0)

10. Regular Expression Matching (JAVA)
摘要:Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. '.' Matches any single character.'*' 阅读全文

posted @ 2019-04-24 14:12 joannae 阅读(152) 评论(0) 推荐(0)

9. Palindrome Number (JAVA)
摘要:Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121Output: true 阅读全文

posted @ 2019-04-23 17:54 joannae 阅读(161) 评论(0) 推荐(0)

9. Palindrome Number
摘要:Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) 阅读全文

posted @ 2016-05-30 09:28 joannae 阅读(147) 评论(0) 推荐(0)

8. String to Integer (atoi)
摘要:mplement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below a 阅读全文

posted @ 2016-05-19 20:08 joannae 阅读(189) 评论(0) 推荐(0)

7. Reverse Integer
摘要:Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have you thought about this? Here are some good questions t 阅读全文

posted @ 2016-05-12 06:28 joannae 阅读(199) 评论(0) 推荐(0)

6. ZigZag Conversion
摘要:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文

posted @ 2016-05-11 19:50 joannae 阅读(229) 评论(0) 推荐(0)

5. Longest Palindromic Substring
摘要:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes 阅读全文

posted @ 2016-05-10 11:07 joannae 阅读(194) 评论(0) 推荐(0)

4. Median of Two Sorted Arrays
摘要:There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文

posted @ 2016-05-05 19:31 joannae 阅读(143) 评论(0) 推荐(0)

上一页 1 2 3 4 5 下一页

导航