<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[weixin_36629430的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/weixin_36629430</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; weixin_36629430]]></copyright><item><title><![CDATA[Classes more than 5 students |leetcode |mysql]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107970772</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107970772</guid><author>weixin_36629430</author><pubDate>Thu, 13 Aug 2020 04:19:12 +0800</pubDate><description><![CDATA[select class
from courses
group by class
having count(distinct student)&gt;=5;


]]></description><category></category></item><item><title><![CDATA[Best Time to Buy and Sell | Leetcode | C++]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107970756</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107970756</guid><author>weixin_36629430</author><pubDate>Thu, 13 Aug 2020 03:33:21 +0800</pubDate><description><![CDATA[class Solution
{
public:
    int maxProfit(vector&lt;int&gt;&amp; prices)
    {
        int valley = INT_MAX;
        int profit = 0;
        for(int i =0; i &lt; prices.size(); i++)
        {
            if(prices[i] &lt; valley)
                valley =.]]></description><category></category></item><item><title><![CDATA[Merge two sorted List | leetcode | C++]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107948600</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107948600</guid><author>weixin_36629430</author><pubDate>Wed, 12 Aug 2020 02:47:19 +0800</pubDate><description><![CDATA[class Solution 
{
public:
    ListNode* mergeTwoLists(ListNode* l1, ListNode* l2)
    {
        std::vector&lt;int&gt; chain;
        ListNode* head = new ListNode(0);
        ListNode* result =head;
        ListNode* l =l1;
        
        while(l!= NUL.]]></description><category></category></item><item><title><![CDATA[Custmoer placing the largest orders |leetcode |mysql]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107926203</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107926203</guid><author>weixin_36629430</author><pubDate>Tue, 11 Aug 2020 05:44:03 +0800</pubDate><description><![CDATA[select customer_number 
from orders
group by customer_number
order by count(order_number) desc
limit 1


]]></description><category></category></item><item><title><![CDATA[Valid Parentheses |leetcode |python3]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107926200</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107926200</guid><author>weixin_36629430</author><pubDate>Tue, 11 Aug 2020 05:34:32 +0800</pubDate><description><![CDATA[class Solution:
    def isValid(self, s: str) -&gt; bool:
        queue = []
        pare_dict = {')':'(',']':'[','}':'{'}
        for c in s:
            if c in pare_dict:
                if queue:
                    top = queue.pop()
                e.]]></description><category></category></item><item><title><![CDATA[Find Customer Referee_id]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107903826</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107903826</guid><author>weixin_36629430</author><pubDate>Mon, 10 Aug 2020 06:31:59 +0800</pubDate><description><![CDATA[select name 
from customer 
where referee_id !=2 or referee_id is NULL


]]></description><category></category></item><item><title><![CDATA[Word Ladder | Leetcode | Python3]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107903823</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107903823</guid><author>weixin_36629430</author><pubDate>Mon, 10 Aug 2020 06:27:25 +0800</pubDate><description><![CDATA[from collections import defaultdict
class Solution:    
    def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -&gt; int:
        if endWord not in wordList: return 0
        all_combo_dict = defaultdict(list)
        for word in wo.]]></description><category></category></item><item><title><![CDATA[Employee Bonus | Leetcode | Mysql]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107889192</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107889192</guid><author>weixin_36629430</author><pubDate>Sun, 09 Aug 2020 06:07:08 +0800</pubDate><description><![CDATA[SELECT
    Employee.name, Bonus.bonus
FROM
    Employee
        LEFT JOIN
    Bonus ON Employee.empid = Bonus.empid
WHERE
    bonus &lt; 1000 OR bonus IS NULL
;


]]></description><category></category></item><item><title><![CDATA[X of a Kind in a Deck of Cards | Leetcode | Python3]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107889179</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107889179</guid><author>weixin_36629430</author><pubDate>Sun, 09 Aug 2020 04:57:40 +0800</pubDate><description><![CDATA[def hcf(x, y):
        if x &gt; y:
            smaller = y
        else:
            smaller = x
        for i in range(1,smaller + 1):
            if((x % i == 0) and (y % i == 0)):
                hcf = i
 
        return hcf

class Solution:
    def h.]]></description><category></category></item><item><title><![CDATA[Game Play Analysis | Leetcode | Mysql]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107853720</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107853720</guid><author>weixin_36629430</author><pubDate>Fri, 07 Aug 2020 05:35:48 +0800</pubDate><description><![CDATA[1.



 select player_id, min(event_date) as 'first_login'
 from Activity
 group by player_id 

2.


select A1.player_id,A1.device_id
from Activity A1, 
(select player_id, min(event_date) as 'first_login'
 from Activity
 group by player_id) A2
where A1....]]></description><category></category></item><item><title><![CDATA[Logger Rate Limiter | Leetcode | python]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107853705</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107853705</guid><author>weixin_36629430</author><pubDate>Fri, 07 Aug 2020 04:06:31 +0800</pubDate><description><![CDATA[class Logger:

    def __init__(self):
        """
        Initialize your data structure here.
        """
        self.msg_dict = {}

    def shouldPrintMessage(self, timestamp: int, message: str) -&gt; bool:
        """
        Returns true if the mess.]]></description><category></category></item><item><title><![CDATA[Rising Temperature | leetcode  | Mysql]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107829843</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107829843</guid><author>weixin_36629430</author><pubDate>Thu, 06 Aug 2020 04:38:07 +0800</pubDate><description><![CDATA[select w2.Id
from
Weather w1, Weather w2
where w2.Temperature &gt; w1.Temperature AND DATEDIFF(w2.RecordDate, w1.RecordDate) = 1


]]></description><category></category></item><item><title><![CDATA[MovingAverage | leetcode Python3]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107829834</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107829834</guid><author>weixin_36629430</author><pubDate>Thu, 06 Aug 2020 04:37:14 +0800</pubDate><description><![CDATA[class MovingAverage:

    def __init__(self, size: int):
        """
        Initialize your data structure here.
        """
        self.size = size
        self.window = []

    def next(self, val: int) -&gt; float:
        size = self.size
        win.]]></description><category></category></item><item><title><![CDATA[Leetcode 299 | Bulls and cows |  C++]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107807106</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107807106</guid><author>weixin_36629430</author><pubDate>Wed, 05 Aug 2020 09:59:20 +0800</pubDate><description><![CDATA[class Solution {
public:    
    int inside(int a , std::vector&lt;int&gt; v)
    {
        for (int i = 0; i &lt; v.size(); i++)
        {
            if (a == v[i]) return i;
            
        }
        
        return -1;
        
    }    
    
   .]]></description><category></category></item><item><title><![CDATA[Python 直接拷贝 浅拷贝 深拷贝 区别]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107507753</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107507753</guid><author>weixin_36629430</author><pubDate>Wed, 22 Jul 2020 10:55:11 +0800</pubDate><description><![CDATA[直接复制 只是把引用增多了一个 , 用任意一个引用改变对象都会导致其他引用也变.



copy - 浅拷贝, 复制了一个新的父对象, 但是对象中如果有嵌套结构, 子对象的元素改变也会引起所有的引用都改变



copy.deepcopy() 完全复制父对象与子对象, 完全独立.


import copy
a = [1, 2, 3, 4, ['a', 'b']] #原始对象
 
b = a                       #赋值，传对象的引用
c = copy.copy(a)       ..]]></description><category></category></item><item><title><![CDATA[Text Justification | Leetcode 68 C++]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107446054</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107446054</guid><author>weixin_36629430</author><pubDate>Sun, 19 Jul 2020 15:33:19 +0800</pubDate><description><![CDATA[class Solution {
public:
    vector&lt;string&gt; fullJustify(vector&lt;string&gt;&amp; words, int maxWidth) 
    {
        std::vector&lt;std::string&gt; result;
        int line_index = 0;
        int letter_count = 0;
        int i = 0;
        std::ve.]]></description><category></category></item><item><title><![CDATA[Letter Combination | Leetcode]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/107011784</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/107011784</guid><author>weixin_36629430</author><pubDate>Mon, 29 Jun 2020 06:01:11 +0800</pubDate><description><![CDATA[class Solution{
private:
  const string digit_to_letter[10] =
  {
    " ",
    "",
    "abc",
    "def",
    "ghi",
    "jkl",
    "mno",
    "pqrs",
    "tuv",
    "wxyz"
  };
 
  std::vector&lt;std::str...]]></description><category></category></item><item><title><![CDATA[184. Department Highest Salary | Leetcode]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/106991279</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/106991279</guid><author>weixin_36629430</author><pubDate>Sun, 28 Jun 2020 01:18:41 +0800</pubDate><description><![CDATA[select distinct Department.Name as 'Department',Employee.Name as 'Employee',D1.Salary
from Department, Employee,
(select Max(Employee.Salary) as Salary ,DepartmentId from Employee group by DepartmentId) as D1
where Department.Id = D1.DepartmentId and Empl.]]></description><category></category></item><item><title><![CDATA[Customers who never order | Leetcode]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/106991107</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/106991107</guid><author>weixin_36629430</author><pubDate>Sun, 28 Jun 2020 00:36:32 +0800</pubDate><description><![CDATA[select C1.Name as Customers
from Customers C1
where C1.Id not in
( select CustomerId from Orders);
]]></description><category></category></item><item><title><![CDATA[3sum closest | Leetcode]]></title><link>https://blog.youkuaiyun.com/weixin_36629430/article/details/106990850</link><guid>https://blog.youkuaiyun.com/weixin_36629430/article/details/106990850</guid><author>weixin_36629430</author><pubDate>Sun, 28 Jun 2020 00:18:38 +0800</pubDate><description><![CDATA[class Solution
{
public:
  int threeSumClosest(vector&lt;int&gt;&amp; nums, int target)
  {
    int diff = INT_MAX, size = nums.size();
    sort(begin(nums),end(nums));
    for(int i = 0; i &lt; size &amp;&amp; diff != 0; i++)
    {
...]]></description><category></category></item></channel></rss>