LeetCode
LeetCode Problem No.17 No.16 is here modalsoul.hatenablog.com 17. Letter Combinations of a Phone Number Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return th…
LeetCode Problem No.16 No.15 is here modalsoul.hatenablog.com 16. 3Sum Closest Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three i…
LeetCode Problem No.15 No.14 is here modalsoul.hatenablog.com 15. 3Sum Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that…
LeetCode Problem No.14. No.13 is here. modalsoul.hatenablog.com 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Examp…
LeetCode Problem No.13. No.12 is here. modalsoul.hatenablog.com 13. Roman to Integer Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Given a roman numeral, convert it to an integer. Example 1 Input: s = "…
LeetCode Problem No.12. No.11 is here. modalsoul.hatenablog.com 12. Integer to Roman Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Given an integer, convert it to a roman numeral. Input is guaranteed to…
LeetCode Problem No.11. No.10 is here. modalsoul.hatenablog.com 11. Container With Most Water https://leetcode.com/problems/container-with-most-water/ Given n non-negative integers a1, a2, ..., an , where each represents a point at coordin…
LeetCode Problem No.10. No.9 is here. modalsoul.hatenablog.com 10. Regular Expression Matching https://leetcode.com/problems/regular-expression-matching/ Given an input string (s) and a pattern (p), implement regular expression matching wi…
LeetCode problem No.9. No.8 is here. modalsoul.hatenablog.com 9. Palindrome Number https://leetcode.com/problems/palindrome-number/ Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as…
LeetCode problem No.8. No.7 is here. modalsoul.hatenablog.com 8. String to Integer (atoi) https://leetcode.com/problems/string-to-integer-atoi/ Implement atoi which converts a string to an integer. The function first discards as many white…
LeetCode problem No.7. No.6 is here. modalsoul.hatenablog.com 7. Reverse Integer https://leetcode.com/problems/reverse-integer/ Given a 32-bit signed integer, reverse digits of an integer. Example 1 Input: 123 Output: 321 Example 2 Input: …
LeetCode problem No.6. No.5 is here. modalsoul.hatenablog.com 6. ZigZag Conversion https://leetcode.com/problems/zigzag-conversion/ The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may wa…
LeetCode problem No.5. No.4 is here. modalsoul.hatenablog.com 5. Longest Palindromic Substring https://leetcode.com/problems/longest-palindromic-substring/ Given a string s, find the longest palindromic substring in s. You may assume that …
LeetCode problem No.4. No.3 is here. modalsoul.hatenablog.com 4. Median of Two Sorted Arrays https://leetcode.com/problems/median-of-two-sorted-arrays/ There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the medi…
LeetCode problem No.3. No.2 is here. modalsoul.hatenablog.com 3. Longest Substring Without Repeating Characters https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest su…
LeetCode 2問目 1問目はこれ modalsoul.hatenablog.com 2. Add Two Numbers https://leetcode.com/problems/add-two-numbers/ 負でない整数2つを表すリンクリストが2つ与えられる このリストは、それぞれのノードに整数の各桁が逆順に格納されている この整…
某入社エントリーに影響を受けてLeetCodeをはじめてみた leetcode.com 最近プライベートで書くコードがスマートホーム系のちょっとしたPythonスクリプトばかりで飽きてきたので、Scalaの手直しも兼ねてやってみる 1. Two Sum https://leetcode.com/problems/…