码迷,mamicode.com
首页 >  
搜索关键字:solution upgrade    ( 13024个结果
python ImportError:No module named 'PIL'
报错ImportError:No module named 'PIL' 缺失一个pillow的数据包,在黑窗口下 pip install -i https://pypi.douban.com/simple pillow 如果报以下错误: 则执行 pip install --upgrade pip - ...
分类:编程语言   时间:2020-11-10 10:45:04    阅读次数:8
冒泡排序(C、Python)
BEGIN: 1、冒泡排序思想(升序排序): 如 a=[9,6,8,7,5,3] i=0 第一趟排序:3与5比较,3和5交换位置,a=[9,6,8,7,3,5]; j=len-1 3与7比较,3和7交换位置,a=[9,6,8,3,7,5]; j=len-2 3与8比较,3和8交换位置,a=[9,6, ...
分类:编程语言   时间:2020-11-10 10:30:08    阅读次数:7
剑指 Offer 45. 把数组排成最小的数
思路 本题解来自:面试题45. 把数组排成最小的数(自定义排序,清晰图解) 1 class Solution { 2 public: 3 string minNumber(vector<int>& nums) { 4 vector<string> vs; 5 for(int i = 0; i < n ...
分类:编程语言   时间:2020-11-08 17:55:22    阅读次数:27
LeetCode 78. 子集
class Solution { public List<List<Integer>> subsets(int[] nums) { List<List<Integer>> res = new ArrayList<>(); res.add(new ArrayList<>()); for(int i = ...
分类:其他好文   时间:2020-11-08 16:53:04    阅读次数:16
LeetCode #509. Fibonacci Number
###题目 509. Fibonacci Number ###解题方法 当成动态规划题来做,设置一个数组存储每轮计算后的fib数,从2开始遍历到N+1,然后返回最后一位即可。 ###代码 class Solution: def fib(self, N: int) -> int: if not N: ...
分类:其他好文   时间:2020-11-08 16:42:43    阅读次数:18
DSA 2020-7
若有恒,何必三更眠五更起; 最无益,莫过一日曝十日寒。 7.25 分割数组的最大值 区间dp 最大值可以方便的转移,所以可以直接应用区间dp 为什么这里的状态转移不一样? 对比最经典的区间dp 题目 石子合并 \[ j = i+l-1\\ dp[i][j] = \max_{k\in [i,j)}(d ...
分类:其他好文   时间:2020-11-07 16:44:26    阅读次数:18
题解 CF61B 【Hard Work】
Translation 判断字符串 \(s_1, s_2, s_3\) 能否通过首位相连的方式组成 \(t_i\)(不考虑大小写)。 Solution 首先,输入 $3$ 个字符串 \(s_1, s_2, s_3\),因为不考虑大小写,所以可以把它们全部都变成小写(这里以小写为例,大写也可以)。 接 ...
分类:其他好文   时间:2020-11-07 16:36:13    阅读次数:18
周练(11)70. 爬楼梯
# # @lc app=leetcode.cn id=70 lang=python3 # # [70] 爬楼梯 # # @lc code=start class Solution: def climbStairs(self, n: int) -> int: if n == 1: return 1 i ...
分类:其他好文   时间:2020-11-07 16:09:23    阅读次数:19
Leetcode(easy Double pointer)
Leetcode(easy Double pointer) Leetcode 双指针简单题目 26 删除排序数组中的重复项 class Solution{ public int removeDuplicates(int[] nums){ // step代表慢指针 int step = 0; // 这 ...
分类:其他好文   时间:2020-11-06 02:28:21    阅读次数:24
简单的消息队列实现
一、服务端程序 **1. .h file** #ifndef UPGRADE_H #define UPGRADE_H #define MSG_MAX_SIZE (24) enum { HTTP_TYPE_UPLOAD = 0x0, HTTP_TYPE_DOWNLOAD }; typedef stru ...
分类:其他好文   时间:2020-11-04 19:07:09    阅读次数:21
13024条   上一页 1 ... 40 41 42 43 44 ... 1303 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!