Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in pla…
分类:LeetCode
2018-05-12 633. Sum of Square Numbers
题意:给你一个非负数c,判断该数是不是两个完全平方数的和(a^2 + b^2) = c. 解题思路: 思路一:暴力。筛选a,b:a^2 <= c, b ^2 <= c,然后组合a^2 + b^2与c比较,时间…
[LeetCode By Go 6]557. Reverse Words in a String III
题目 Given a string, you need to reverse the order of characters in each word within a sentence while still pres…
[LeetCode] Maximum Depth of Binary Tree 二叉树的最大深度
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest…
[LeetCode] My Calendar II 我的日历之二
Implement a MyCalendarTwo class to store your events. A new event can be added if adding the …
LeetCode之Breadth-first Search题目汇总
Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes…
[Leetcode] Search in Rotated Sorted Array 搜索旋转有序数组
Search in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i…
力扣(LeetCode)513
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个二叉树,在树的最后一行找到最左边的值。 示例 1: 输入: 2 / \ 1 3 输出:1 示例 2: 输入: 1 / \…
[array] leetCode-15. 3Sum-Medium
leetCode-15. 3Sum-Medium descrition Given an array S of n integers, are there elements a, b, c in S such that …
7.整数翻转(Swift版)
一、题目 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。 示例 1: 输入: 123 输出: 321 示例 2: 输入: -123 输出: -321 示例 3: 输入: 120 输出: 21 注…
283. Move Zeroes
描述 Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative…
[LeetCode] Excel Sheet Column Title 求Excel表列名称,Excel Sheet Column Number,Excel Sheet Column Number
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For exampl…