オットセイの経営日誌

データサイエンス系ベンチャーを経営してます。経営のこと、趣味のことつぶやきます。

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

LeetCode / Ransom Note

リハビリその2。 https://leetcode.com/problems/ransom-note/ Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed fro…

LeetCode / Guess Number Higher or Lower

今年も残すところ後1週間程度ですね。 ここ数ヶ月は怒涛のように過ぎ去り、ちょっと自分の人としての器を超えた容量が押し寄せている感じで、リハビリの必要性を感じてます。 ということで、リハビリがてらプレーンな二分探索問題を解きます。 https://leetc…

データサイエンスコンペプラットフォームNishika、リリースしました。

起業して早数ヶ月。 おそらく通常のベンチャーがあまり経験していないであろう苦難が幾度かありましたが、本日漸く、サービスリリースにこぎつけました。 Nishika やりたいことの30%もできていない状態ではありますが、兎にも角にも自分たちの目指すものを形…

AI・機械学習に限らない異常検知の手法

仕事をバリバリやりながらブログ記事を投稿するって、なかなかきつい。 しっかり定期的に更新できる方は、どういう時間術を駆使しているんだろう。 そんな悩みを抱えていた中、仕事で表題の件についてまとめる機会があり、ちょうど記事化できそうな内容なの…

Kaggleコンペ初心者が命削りながらなんとかメダル圏内に滑り込んだ話 (IEEE-CIS Fraud Detection)

前回のブログ記事投稿から約1ヶ月。この1ヶ月はKaggleのIEEE-CIS Fraud Detectionに人生を捧げると決めてブログを休んでいましたが、10/4にコンペが終了しました。 結果は、6381の参加チーム中、532位でした。上位10%に入ることができ、初Kaggle本気参戦で…

DAG(有向非循環グラフ)に対する最長経路問題(AtCoder Beginner Contest 139より)

最近はKaggleを優先していてなかなか競プロの時間を取れないのですが、AtCoderのABCには参加しています。 で、1週間遅れになってしまいましたが、先日のABC139でDAGの問題が出ました。 DAGは今後も重要そうな気がして、YouTube公式解説のC++のコードを読み解…

LeetCode / Number of 1 Bits

ビット表現祭りその2。 https://leetcode.com/problems/number-of-1-bits/ Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1: Input: 00000000000000000000000000…

LeetCode / Reverse Bits

ビット表現祭り。 https://leetcode.com/problems/reverse-bits/ Reverse bits of a given 32 bits unsigned integer. Example 1: Input: 00000010100101000001111010011100 Output: 00111001011110000010100101000000 Explanation: The input binary string…

LeetCode / Rotate Array

https://leetcode.com/problems/rotate-array/ Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate 1 steps to the right: [7…

LeetCode / Factorial Trailing Zeroes

今日は算数の問題です。大人より小学生の方が解けるかも? https://leetcode.com/problems/factorial-trailing-zeroes/ Given an integer n, return the number of trailing zeroes in n!. Example 1: Input: 3 Output: 0 Explanation: 3! = 6, no trailing …

LeetCode / Excel Sheet Column Number

https://leetcode.com/problems/excel-sheet-column-number/ Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... 先日の記事はFrom列インデ…

過半数判定アルゴリズム(LeetCode / Majority Elementより)

過半数を獲得した候補者を効率的に特定するにはどんな方法が良いと思いますか? 今日の問題は、そう読み替えてみるとなかなか奥が深いです。 https://leetcode.com/problems/majority-element/ Given an array of size n, find the majority element. The ma…

木構造のDFS(AtCoder Beginner Contest 138より)

1週間遅れですが、ABCで木構造の問題が解けなかったので、2度同じ間違いを繰り返さぬようメモります。 問題内容・解法 D - Ki atcoder.jp 問題文その通りの考え方をすると、以下のように計算されていくことになります(ピンクの丸が頂点id、白い丸が値)。 …

LeetCode / Excel Sheet Column Title

https://leetcode.com/problems/excel-sheet-column-title/ Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB ... エクセルシートの列名を…

LeetCode / Intersection of Two Linked Lists

https://leetcode.com/problems/intersection-of-two-linked-lists/ Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to intersect at node c1. Notes…

LeetCode / Min Stack

https://leetcode.com/problems/min-stack/ Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Get…

LeetCode / Linked List Cycle II

https://leetcode.com/problems/linked-list-cycle-ii Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use an integer pos which represents the po…

機械学習用データ公開におけるプライバシー保護に関する留意点

データサイエンスコンペの題材としてデータ公開する際、プライバシー保護は避けて通れない論点と考え「データ解析におけるプライバシー保護(佐久間淳)」を読んだのですが、非常によくまとまっていたので、重要と考えた点をまとめます。 そして願わくば、プ…

LeetCode / Linked List Cycle

Kaggle繋がりでTwitterでばったりフォローした人がばったり旧知の囲碁友だった件。 ちょうど今日の問題のLinked Listのようにぐるりと回って再会しました(無理矢理 https://leetcode.com/problems/linked-list-cycle/ Given a linked list, determine if it…

LeetCode / Single Number

昨夜実家の富山から帰ってきました。 台風さんがフェーン現象を巻き起こしたせいで、北陸は地獄のような気候になってます。 私が兼ねてから主張している国民総打ち水法の制定を真摯に考えるべきかと思います! ja.wikipedia.org さて、今日の問題。 https://…

LeetCode / Valid Palindrome

終日頭が重い@mhiro216です。 気象病ってやつなんだろうか。全部台風のせいだ。 www.d-yutaka.co.jp さて、軽い問題で頭をほぐします。 https://leetcode.com/problems/valid-palindrome/ Given a string, determine if it is a palindrome, considering onl…

LeetCode / Best Time to Buy and Sell Stock II @柏の葉コワーキングスペースKOIL

今日は柏の葉のコワーキングスペースに来てみました。 www.31ventures.jp 日本最大級らしいので、ここまでのクオリティが他でもあるわけではないと思いますが、 1日(9時-23時まで)で1500円 ということで、圧倒的なコスパに驚愕しております。 柏の葉というこ…

LeetCode / Best Time to Buy and Sell Stock

東京都内在住の私ですが、ひとり開発合宿なるものをやってみようと思い、とある県のホテルに泊まって、部屋から出ず黙々とコードの写経をしています。 しかし、ひとり開発合宿は、自分に対する甘えを断ち切れる精神の持ち主でないと、あまり向いていないです…

AtCoder Contest 初参戦記録

いつもLeetCodeを解いている私ですが、どうやらAtCoderという競技プログラミングサイトでの"色"がプログラマーとしてのスキルの一端を表すものであるらしいと聞き、せっかくなので参戦してみることにしました。 参戦前準備 参戦前準備というのは会員登録だと…

LeetCode / Pascal's Triangle II

AtCoderのBeginner Contentに初参戦してみました。 結果は緑(こちらのページによれば "ソフトウェアエンジニアとして申し分ない実力です" のレベル)相当には後一歩及ばずというところ。まだまだ精進です。 さて、今日の問題。 https://leetcode.com/problems…

LeetCode / Pascal's Triangle

https://leetcode.com/problems/pascals-triangle/ Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it. Example: パスカルの三…

LeetCode / Path Sum II

https://leetcode.com/problems/path-sum-ii/ Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. Example: Given the below binary tree and sum = 22, R…

LeetCode / Path Sum

https://leetcode.com/problems/path-sum/ Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Note: A leaf is a node with no children. Example: …

AutoMLで文学作品(日本語)の分類をしてみた

先日の記事で、創業記念で打ち出そうと考えているデータサイエンスコンペティションのアイデアをご紹介しましたが、 GoogleのAutoML Natural Languageが一応日本語の自然言語分類にも対応しているとのことで、同様のデータを元手に試してみました。 正確には…

LeetCode / Balanced Binary Tree

https://leetcode.com/problems/balanced-binary-tree/ Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the depth of the two subtrees of every node …