マツシタのお勉強

Recursive Function

Find an Element from Sorted Matrix

Problem Given an M * N matrix in which each row and each column is sorted in ascending order, write a method to find an element. Solution O(N + M) solution By traversing matrix from upper right to lower left, we can solve this problem in O…

298. Binary Tree Longest Consecutive Sequence : Past Google Coding Interview

Problem https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/ How to Solve This problem is classified into Tree and can be solve by using DFS(Depth First Search). Depth First Search Firstly, I thought the only search by D…