题目链接 题意 : 求斐波那契数列第n项 很简单一道题, 写它是因为想水一篇博客 勾起了我的回忆 首先, 求斐波那契数列, 一定 不 要 用 递归 ! 依稀记得当年校赛, 我在第一题交了20发超时, 就是因为用了递归, 递归时大量的出入栈操作必然比循环时间来得久 这题估摸着是每个测试样例就一个数, ...
分类:
其他好文 时间:
2020-06-13 10:51:18
阅读次数:
73
题目如下: Given a binary string s and an integer k. Return True if every binary code of length k is a substring of s. Otherwise, return False. Example 1: ...
分类:
其他好文 时间:
2020-06-13 10:37:42
阅读次数:
60
###题目 几个朋友来到电影院的售票处,准备预约连续空余座位。 你能利用表 cinema ,帮他们写一个查询语句,获取所有空余座位,并将它们按照 seat_id 排序后返回吗? | seat_id | free | | | | | 1 | 1 | | 2 | 0 | | 3 | 1 | | 4 | ...
分类:
数据库 时间:
2020-06-13 01:01:45
阅读次数:
82
壹 ? 引 简单问题简单做,今天的题目来自leetcode771. 宝石与石头,字符串相关的一道题,题目描述如下: 给定字符串J 代表石头中宝石的类型,和字符串 S代表你拥有的石头。 S 中每个字符代表了一种你拥有的石头的类型,你想知道你拥有的石头中有多少是宝石。 J 中的字母不重复,J 和 S中的 ...
分类:
Web程序 时间:
2020-06-13 00:38:20
阅读次数:
81
###题目 Table: Product + + + | Column Name | Type | + + + | product_id | int | | product_name | varchar | | unit_price | int | + + + product_id 是这个表的主键 ...
分类:
数据库 时间:
2020-06-13 00:24:06
阅读次数:
75
LeetCode 91 动态规划 Decode Ways 解码方法LeetCodeA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> ... ...
分类:
其他好文 时间:
2020-06-13 00:18:17
阅读次数:
56
package LeetCode_559 import java.util.* /** * 559. Maximum Depth of N-ary Tree * https://leetcode.com/problems/maximum-depth-of-n-ary-tree/description ...
分类:
其他好文 时间:
2020-06-12 14:27:25
阅读次数:
74
地址 https://www.acwing.com/file_system/file/content/whole/index/content/583673/ 你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c , 使得 a + b + c = 0 ?请你找出所有满 ...
分类:
其他好文 时间:
2020-06-12 14:22:48
阅读次数:
47
15. 三数之和 给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有满足条件且不重复的三元组。 注意:答案中不可以包含重复的三元组。 示例: 给定数组 nums = [-1, 0, 1, 2, -1, -4], ...
分类:
其他好文 时间:
2020-06-12 13:05:06
阅读次数:
55
package LeetCode_1411 /** * 1411. Number of Ways to Paint N × 3 Grid * https://leetcode.com/problems/number-of-ways-to-paint-n-3-grid/description/ * * ...
分类:
其他好文 时间:
2020-06-12 12:47:40
阅读次数:
58