题目: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest p…
分类:LeetCode
LeetCode | Jump Game II
题目: Given an array of non-negative integers, you are initially positioned at the first index of the array. Eac…
989. Add to Array-Form of Integer
For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For exampl…
LeetCode547. Friend Circles
There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive …
682. Baseball Game
原题:https://leetcode.com/problems/baseball-game/description/ 大意:这道题初一看没看懂意思,其实很简单 Integer (one round’s sc…
【Leetcode】14. Longest Common Prefix 两个字符串的最长公共前缀长度
1. 题目 Write a function to find the longest common prefix string amongst an array of strings. 2. 思路 遍历按序逐个比较,直接…
[LeetCode][Python]67.Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = “11” b = ̶…
面经高频题dot product
FB面经题,地里虽然很多人都提到了,但写清楚了的没几个。说明什么问题呢?就算题目都是tag题,都是高频面经题,能完美写出来问题都能答上的永远也都是少数人。不仅努力在刷,而且认真分析了思路,认真分析了时空复杂度了吗? 用L…
[LeetCode] Multiply Strings 字符串相乘
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The n…
[LeetCode] Delete Node in a Linked List 删除链表的节点
Write a function to delete a node (except the tail) in a singly linked list, given only access to that …
[LeetCode] Remove K Digits 去掉K位数字
Given a non-negative integer num represented as a string, remove k digits from the …
[LeetCode] Sentence Similarity 句子相似度
Given two sentences words1, words2 (each represented as an array of strings), and a list of s…