modalsoul’s blog

これは“失敗”と呼べるかもしれないが、ぼくは“学習体験”と呼びたい

2019-01-01から1年間の記事一覧

LeetCode 4. Median of Two Sorted Arrays

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 3. Longest Substring Without Repeating Characters

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. Add Two Numbers

LeetCode 2問目 1問目はこれ modalsoul.hatenablog.com 2. Add Two Numbers https://leetcode.com/problems/add-two-numbers/ 負でない整数2つを表すリンクリストが2つ与えられる このリストは、それぞれのノードに整数の各桁が逆順に格納されている この整…

LeetCode 1. Two Sum

某入社エントリーに影響を受けてLeetCodeをはじめてみた leetcode.com 最近プライベートで書くコードがスマートホーム系のちょっとしたPythonスクリプトばかりで飽きてきたので、Scalaの手直しも兼ねてやってみる 1. Two Sum https://leetcode.com/problems/…

Luhnアルゴリズムによる誤り検出

Luhnアルゴリズムについてちょっと話題に上がったので書いてみる Luhnアルゴリズム 1 クレジットカード番号やIMEI番号の検証に使われているアルゴリズムで 任意の1桁の間違いや隣接する桁の数字の順序間違いを検出できる 09 から 90 (または逆)という間違…