上一页 1 2 3 4 5 6 7 8 9 ··· 32 下一页
摘要: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2023-03-16 17:22 MarkLeeBYR 阅读(30) 评论(0) 推荐(0)
摘要: 一、主从复制概述 主从复制,是指将一台Redis服务器的数据,复制到其他的Redis服务器。前者称为主节点(master),后者称为从节点(slave);数据的复制是单向的,只能由主节点到从节点。 默认情况下,每台Redis服务器都是主节点;且一个主节点可以有多个从节点(或没有从节点),但一个从节点 阅读全文
posted @ 2023-03-04 00:08 MarkLeeBYR 阅读(180) 评论(0) 推荐(1)
摘要: 1、单列去重,输出去重后条目数量 select count(distinct(`id`)) from student; 2、根据分数段统计数据条目:利用case when selectcount(case when move_num between 1 and 5 then 0 end) as 1到 阅读全文
posted @ 2023-03-02 14:22 MarkLeeBYR 阅读(71) 评论(0) 推荐(0)
摘要: 数字以 0123456789101112131415... 的格式作为一个字符序列,在这个序列中第 2 位(从下标 0 开始计算)是 2 ,第 10 位是 1 ,第 13 位是 1 ,以此类题,请你输出第 n 位对应的数字。 输入:2,返回:2 输入:10,返回:1 我们尝试来找一下规律: 小于10 阅读全文
posted @ 2023-03-01 20:49 MarkLeeBYR 阅读(111) 评论(0) 推荐(0)
摘要: public class Solution { private int res = 0; //dfs 以每个结点作为根查询路径 public int findPath (TreeNode root, int sum) { //为空则返回 if(root == null) return res; // 阅读全文
posted @ 2023-02-28 22:01 MarkLeeBYR 阅读(23) 评论(0) 推荐(0)
摘要: leetcode https://www.cnblogs.com/MarkLeeBYR/p/16907404.html 阅读全文
posted @ 2023-02-28 20:38 MarkLeeBYR 阅读(5) 评论(0) 推荐(0)
摘要: 在一个m×n的棋盘的每一格都放有一个礼物,每个礼物都有一定的价值(价值大于 0)。你可以从棋盘的左上角开始拿格子里的礼物,并每次向右或者向下移动一格、直到到达棋盘的右下角。给定一个棋盘及其上面的礼物的价值,请计算你最多能拿到多少价值的礼物? 如输入这样的一个二维数组,[[1,3,1],[1,5,1] 阅读全文
posted @ 2023-02-28 20:30 MarkLeeBYR 阅读(17) 评论(0) 推荐(0)
摘要: leetcode 3 https://www.cnblogs.com/MarkLeeBYR/p/16843653.html 阅读全文
posted @ 2023-02-28 20:01 MarkLeeBYR 阅读(9) 评论(0) 推荐(0)
摘要: 描述 有一种将字母编码成数字的方式:'a'->1, 'b->2', ... , 'z->26'。 现在给一串数字,返回有多少种可能的译码结果 输入:"12"返回值:2说明:2种可能的译码结果(”ab” 或”l”) public int solve(String nums) { //排除0 if(nu 阅读全文
posted @ 2023-02-28 18:27 MarkLeeBYR 阅读(46) 评论(0) 推荐(0)
摘要: 给你一根长度为 n 的绳子,请把绳子剪成整数长的 m 段( m 、 n 都是整数, n > 1 并且 m > 1 , m <= n ),每段绳子的长度记为 k[1],...,k[m] 。请问 k[1]*k[2]*...*k[m] 可能的最大乘积是多少?例如,当绳子的长度是 8 时,我们把它剪成长度分 阅读全文
posted @ 2023-02-28 17:35 MarkLeeBYR 阅读(24) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 32 下一页