<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[helloworld0529的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/helloworld0529</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; helloworld0529]]></copyright><item><title><![CDATA[Python]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/136317307</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/136317307</guid><author>helloworld0529</author><pubDate>Tue, 27 Feb 2024 11:20:31 +0800</pubDate><description><![CDATA[无法加载conda：把anaconda添加到用户变量和环境变量中。]]></description><category></category></item><item><title><![CDATA[【Python】str-＞list]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/113357448</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/113357448</guid><author>helloworld0529</author><pubDate>Thu, 28 Jan 2021 20:12:57 +0800</pubDate><description><![CDATA[str-&gt;list
输入：string([1.1, 2.2])
输出：[1.1, 2.2]

]]></description><category></category></item><item><title><![CDATA[122. 买卖股票的最佳时机 II]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112915681</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112915681</guid><author>helloworld0529</author><pubDate>Thu, 21 Jan 2021 08:49:21 +0800</pubDate><description><![CDATA[P144. 不限次数进行股票买卖的最大利润
思路：波峰和波谷之间不断卖出即可

class Solution {
public:
    int maxProfit(vector&lt;int&gt;&amp; prices) {
        int max=0;
        for(int i=0; i&lt;prices.size()-1; i++)
        {
            if(prices[i+1]&gt;prices[i])//价格升高则卖出
             ]]></description><category></category></item><item><title><![CDATA[55. 跳跃游戏]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112915489</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112915489</guid><author>helloworld0529</author><pubDate>Thu, 21 Jan 2021 08:30:50 +0800</pubDate><description><![CDATA[P106. 跳数组
思路：如果一个位置能够到达，那么这个位置左侧所有位置都能到达

class Solution {
public:
    bool canJump(vector&lt;int&gt;&amp; nums) {
        int maxdis = 0;//记录能到达的最远位置
        for(int i=0; i&lt;nums.size(); i++)
        {
            if(maxdis&lt;i)//能到达的最远位置小于当前位置
       ]]></description><category></category></item><item><title><![CDATA[96. 不同的二叉搜索树]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112873606</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112873606</guid><author>helloworld0529</author><pubDate>Wed, 20 Jan 2021 15:33:43 +0800</pubDate><description><![CDATA[149 二叉搜索树的数量
解法一：动态规划记忆
d[i]表示i个递增的数字能构成的二叉搜索树的数量

class Solution {
public:
    int numTrees(int n) {
        int d[10000]={0};
        d[0]=1;
        d[1]=1;
        for(int i=2;i&lt;=n;i++)
            for(int j = 1;j&lt;=i;j++)
                d[i]+=d[]]></description><category></category></item><item><title><![CDATA[210.课程表Ⅱ]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112868455</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112868455</guid><author>helloworld0529</author><pubDate>Wed, 20 Jan 2021 14:27:32 +0800</pubDate><description><![CDATA[思路类似207，只需要增加一个数组存放入度=0的课程顺序即可
class Solution {
public:
    vector&lt;int&gt; findOrder(int numCourses, vector&lt;vector&lt;int&gt;&gt;&amp; prerequisites) {
        vector&lt;int&gt; indeg(numCourses);
        vector&lt;vector&lt;int&gt;&gt; course(numCou]]></description><category></category></item><item><title><![CDATA[207.课程表]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112770336</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112770336</guid><author>helloworld0529</author><pubDate>Tue, 19 Jan 2021 14:03:39 +0800</pubDate><description><![CDATA[class Solution {
public:
    bool canFinish(int numCourses, vector&lt;vector&lt;int&gt;&gt;&amp; prerequisites) {
        if(numCourses==1 || prerequisites.size()==0)
            return true;

        vector&lt;int&gt; indeg(numCourses);//入度表默认初始化=0
     .]]></description><category></category></item><item><title><![CDATA[49.字母异位词分组]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112798919</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112798919</guid><author>helloworld0529</author><pubDate>Tue, 19 Jan 2021 08:56:55 +0800</pubDate><description><![CDATA[class Solution {
public:
    string getKeyBySort(string str){
        int ch[27] = {0};
        string newStr="";
        for(int i = 0;i&lt;str.size();i++)
            ch[str[i]-'a']++;//利用int数组统计26个字母出现次数
        int i = 25;
        while(i&gt;=0)
     .]]></description><category></category></item><item><title><![CDATA[【C++】基本范围的For循环]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112790217</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112790217</guid><author>helloworld0529</author><pubDate>Mon, 18 Jan 2021 17:52:47 +0800</pubDate><description><![CDATA[转载 C++11新特性之基本范围的For循环（range-based-for）

]]></description><category></category></item><item><title><![CDATA[图的表示方法]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112761304</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112761304</guid><author>helloworld0529</author><pubDate>Mon, 18 Jan 2021 10:09:14 +0800</pubDate><description><![CDATA[《图的表示方法》
原文链接传送
（i）邻接矩阵表示法


如果两节点之间有一条弧，则邻接矩阵中对应的元素为1；否则为0。
这种表示法非常简单、直接。
如果网络比较稀疏，这种表示法浪费大量的存储空间，从而增加了在网络中查找弧的时间。
对于网络中的权，也可以用类似邻接矩阵的 矩阵表示。只是此时一条弧所对应的元素不再是1，而是相应的权而已。如果网络中每条弧赋有多种权，则可以用多个矩阵表示这些权。

（ii）关联矩阵表示法


在关联矩阵中，每行 &lt;-&gt; 节点，每列 &lt;-&gt; 弧
如果一个节点]]></description><category></category></item><item><title><![CDATA[103. 二叉树的锯齿形层序遍历]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112761231</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112761231</guid><author>helloworld0529</author><pubDate>Mon, 18 Jan 2021 08:22:09 +0800</pubDate><description><![CDATA[层次优先遍历 BFS
先进行层次遍历，然后区分奇数偶数层（偶数层倒序输出）

class Solution {
public:
    vector&lt;vector&lt;int&gt;&gt; zigzagLevelOrder(TreeNode* root) {
        vector&lt;vector&lt;int&gt;&gt; result;
        queue&lt;TreeNode*&gt; tmpQ;
        int isRev = 0;

        if(r]]></description><category></category></item><item><title><![CDATA[946.验证栈序列]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112708047</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112708047</guid><author>helloworld0529</author><pubDate>Sat, 16 Jan 2021 15:01:11 +0800</pubDate><description><![CDATA[1 模拟栈

class Solution {
public:
    bool validateStackSequences(vector&lt;int&gt;&amp; pushed, vector&lt;int&gt;&amp; popped) {
        int len = pushed.size();
        stack&lt;int&gt;st;
        int i=0;
        while(i&lt;len)
        {
            st.p]]></description><category></category></item><item><title><![CDATA[61.旋转链表]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112693254</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112693254</guid><author>helloworld0529</author><pubDate>Sat, 16 Jan 2021 11:05:49 +0800</pubDate><description><![CDATA[1 链表转环法


class Solution {
public:
    ListNode* rotateRight(ListNode* head, int k) {
        if(k == 0 || head == nullptr || head-&gt;next == nullptr) return head;//多个特判合到一起
        
        int len = 0;
        ListNode* tmp = head;
        for(;tmp-&gt;]]></description><category></category></item><item><title><![CDATA[3.无重复字符的最长子串]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/112488996</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/112488996</guid><author>helloworld0529</author><pubDate>Mon, 11 Jan 2021 20:22:39 +0800</pubDate><description><![CDATA[一文带你 AC 十道题【滑动窗口】
1. 暴力解法（复杂度O(n^2)）
#include &lt;cstring&gt;
class Solution {
public:
    int lengthOfLongestSubstring(string s) {
        if(s=="") return 0;
        string subs="";//sliding window
        int l=0,r=0;
        int max = 0;
        for(;l]]></description><category></category></item><item><title><![CDATA[【Python】专业选修课作业]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/108782748</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/108782748</guid><author>helloworld0529</author><pubDate>Sat, 09 Jan 2021 09:36:02 +0800</pubDate><description><![CDATA[各种Python内置函数查表链接
2020.9.24_C 体质指数
1.题目要求

2.考察点


输入两个浮点数：w, h = map(float, input().split())
2.规范化输出：print(“B:%.2f” % BMI)


3.源代码
w, h = map(float, input().split())
BMI = w / (h*h)
if BMI &lt; 18.5:
    print("A:%.2f" % BMI)
elif 18.5 &lt;= BMI &lt; 24:
 ]]></description><category></category></item><item><title><![CDATA[【英语】重要句型+同义词替换（粉色笔记本）]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/109224373</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/109224373</guid><author>helloworld0529</author><pubDate>Sat, 24 Oct 2020 22:54:56 +0800</pubDate><description><![CDATA[vary from person to person
The opinion of the problem varies from person to person.  对问题的看法因人而异
A be superior/ inferior to B
Some consider digital TV to be superior to satellite TV.  A 优于/不如 B
upon/on doing sth
Upon/On hearing the unexpected news, he was .]]></description><category></category></item><item><title><![CDATA[【英语竞赛】听力速记]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/107884480</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/107884480</guid><author>helloworld0529</author><pubDate>Thu, 22 Oct 2020 16:03:22 +0800</pubDate><description><![CDATA[1. Mini 演讲（section D）



]]></description><category></category></item><item><title><![CDATA[pytorch安装]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/108657549</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/108657549</guid><author>helloworld0529</author><pubDate>Thu, 22 Oct 2020 16:02:53 +0800</pubDate><description><![CDATA[1. Anaconda（Python版本管理软件）
官网下载链接
2. Python下载
windows用户一般下载 executable installer 版本，推荐3.7版本
官网下载链接
3. 版本管理
参考评论区，去掉defaults和https-&gt;http

]]></description><category></category></item><item><title><![CDATA[【A*算法】前世今生]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/108351330</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/108351330</guid><author>helloworld0529</author><pubDate>Thu, 22 Oct 2020 16:02:27 +0800</pubDate><description><![CDATA[0. 时间复杂度分析
bfs &gt; 迪杰斯科拉 &gt; A* &gt; 贪心
1. 宽度优先搜索

适用情况：没有边权

优点：能找到正确最短路径
缺点：时间耗费大

2. 迪杰斯科拉算法

适用情况：有边权

优点：能找到正确最短路径，时间耗费比bfs小
缺点：搜索了所有方向，对于最优化问题来说，本质上没用必要搜索所有方向

3. 贪心算法

适用情况：有边权

优点：耗时短
缺点：找到的最短路径并不一定正确

4. A*算法

适用情况：有边权
在相对少的时间内找到正确的最短路径，适用于大部分情况]]></description><category></category></item><item><title><![CDATA[【英语竞赛】真题训练]]></title><link>https://blog.youkuaiyun.com/helloworld0529/article/details/108914785</link><guid>https://blog.youkuaiyun.com/helloworld0529/article/details/108914785</guid><author>helloworld0529</author><pubDate>Sun, 04 Oct 2020 00:02:46 +0800</pubDate><description><![CDATA[2018决赛
2. Vocabulary &amp; Grammar

You can —— your shorthand ability by taking notes in short-hand during lectures.
A
You must remember not to —— from the point when you write an essay.
A keep in 抑制、储备 Ｂkeep on 继续 C keep up 坚持、使某事维持在高水平
A go off 离开、爆炸 B w]]></description><category></category></item></channel></rss>