这是悦乐书的第229次更新,第241篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第96题(顺位题号是441)。您想要以楼梯形状形成总共n个硬币,其中每个第k行必须具有恰好k个硬币。给定n,…
分类:LeetCode
LeetCode-1. Two Sum(两数之和)C++实现
给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 示例: 给定 …
[LeetCode] Accounts Merge 账户合并
Given a list accounts, each element accounts[i] is a list of strings, where the first el…
LeetCode | 3Sum Closest
题目: Given an array S of n integers, find three integers in S such that the sum i…
LeetCode 258 Add Digits
题目描述 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For …
Leetcode402——Remove K Digits
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. 问题描述 Given a non-negative integer num repres…
【leetcode】- Summary Range (将连续的数组成一个范围)
1、题目描述 Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Input: [0…
1. 两数之和
class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: Li…
117. Populating Next Right Pointers in Each Node II
欢迎fork and star:Nowcoder-Repository-github 117. Populating Next Right Pointers in Each Node II 题目 Follow up fo…
[LeetCode] Rotate Image 旋转图像
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degr…
[LeetCode] Unique Word Abbreviation 独特的单词缩写
An abbreviation of a word follows the form <first letter><number><last letter>. Below…
Group Anagrams
变位词类型的题 1 题目描述 给定列表 ['bat', 'atb', 'eat', 'tba', 'tea', 'abc'] 输出: [['bat', 'atb', 'tba'], ['eat', 'tea'], ['a…