原创 [leetcode] 515. Find Largest Value in Each Tree Row
Find Largest Value in Each Tree Row 描述 You need to find the largest value in each row of a binary tree. Example: Inpu
原创 【牛課堂第二季】第三章 只含1的最大子矩陣
轉載自只含1的最大子矩陣 問題 1 定一個無序矩陣,其中只有1和0兩種值,求只含有1的最大的子矩陣大小,矩陣的大小用其中的元素個數來表示 思路 和前面[子矩陣的最大和 ]不同的是,該矩陣只含0,1兩種值。故與求最大子矩
原创 【牛客網 2017年校招模擬筆試(第一場)】 序列和
求序列和 描述 我們要找連續的一段長度大於等於L小於等於100整數和等於N,容易觀察到合法的長度範圍很小,於是我們從L開始枚舉,然後找到第一個輸出即可。 我的代碼 最初提交了一次代碼,用vector保存了所有滿足條件的序列,輸出長度最
原创 [leetcode] 127. Word Ladder
Same Tree 描述 Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transfo
原创 牛客直播課-代碼實現
每次看牛客上左神的直播都感覺收貨滿滿,講了網易校招題,挑其中有價值的兩個記錄一下,都不難。 一、彩色磚塊 描述 小易有一些彩色的磚塊。每種顏色由一個大寫字母表示。各個顏色磚塊看起來都完全一樣。現在有一個給定的字符串s,s中每個字符代表小易
原创 [leetcode] 2. Add Two Numbers(鏈表、大數相加)
Add Two Numbers 描述 You are given two non-empty linked lists representing two non-negative integers. The digits are sto
原创 [leetcode] 43. Multiply Strings(大數相乘)
Multiply Strings 描述 Given two non-negative integers num1 and num2 represented as strings, return the product of num1 a
原创 [leetcode] 257. Binary Tree Paths
* Binary Tree Paths* 描述 Given a binary tree, return all root-to-leaf paths. For example, given the following binary tr
原创 513. Find Bottom Left Tree Value
Find Bottom Left Tree Value 描述 Given a binary tree, find the leftmost value in the last row of the tree. Example 1: In
原创 [leetcode] 107. Binary Tree Level Order Traversal II
Binary Tree Level Order Traversal II 描述 Given a binary tree, return the bottom-up level order traversal of its nodes’ v
原创 [leetcode] 100. Same Tree
Same Tree 描述 Given two binary trees, write a function to check if they are equal or not. Two binary trees are consider