<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sundawei2016的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sundawei2016</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sundawei2016]]></copyright><item><title><![CDATA[Java函数式接口四部曲之Consumer]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/146166165</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/146166165</guid><author>sundawei2016</author><pubDate>Mon, 10 Mar 2025 22:57:23 +0800</pubDate><description><![CDATA[modify Consumer 接收一个 List， 将每个元素乘以2，displayList 打印每个元素，用andThen连起来。它表示一个接受单个输入参数并且不返回任何结果的操作。通常用于需要对输入参数执行某些操作但不产生返回值的场景。接口还提供了一个默认方法。是一个函数式接口，位于。的参数，并对其执行操作。]]></description><category></category></item><item><title><![CDATA[Optional 的用法]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/136990048</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/136990048</guid><author>sundawei2016</author><pubDate>Sun, 24 Mar 2024 22:27:01 +0800</pubDate><description><![CDATA[如果ofNullable不为空，orElse 会有value输出， orElseGet则不会有值。这是因为orElseGet是懒计算，notNullName有值，method不会被调用，而orElse则不是。orElse 和 orElseGet 源码，orElse入参是一个泛型T，orElseGet入参是一个Supplier。创建的Option实例可以为空。get获取Optional的值，如果为空的话，会报。用of 创建的Option实例必须为非空，用。创建一个为空的optional实例。]]></description><category></category></item><item><title><![CDATA[Java里的泛型＜T＞ T 的运用]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/136589169</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/136589169</guid><author>sundawei2016</author><pubDate>Sat, 09 Mar 2024 19:53:38 +0800</pubDate><description><![CDATA[因为我总是写一些CRUD的代码，泛型的知识都忘得差不多了，今天特地来写一下。如果方法返回的是空的话，需要在public 和 void 之间加上 <T>在类的名称后面加上 <T>，构建类的时候在<>里写明类型。泛型可以认为是 把类型参数化，方便代码重用。我有两个数组，写一个方法得到最后的一个元素。]]></description><category></category></item><item><title><![CDATA[Spring注释 @Service @Qualifier @Repository]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/129719542</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/129719542</guid><author>sundawei2016</author><pubDate>Wed, 22 Mar 2023 22:42:57 +0800</pubDate><description><![CDATA[spring 注释]]></description><category></category></item><item><title><![CDATA[Docker部署运行Nginx]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/128764845</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/128764845</guid><author>sundawei2016</author><pubDate>Thu, 26 Jan 2023 13:00:48 +0800</pubDate><description><![CDATA[docker 部署 nginx]]></description><category></category></item><item><title><![CDATA[Linux CentOS 安装配置 MariaDB]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/126693367</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/126693367</guid><author>sundawei2016</author><pubDate>Sun, 04 Sep 2022 21:35:19 +0800</pubDate><description><![CDATA[centOS 安装 数据库]]></description><category></category></item><item><title><![CDATA[Centos7 NAT模式静态IP配置]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/126572723</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/126572723</guid><author>sundawei2016</author><pubDate>Sun, 04 Sep 2022 18:48:26 +0800</pubDate><description><![CDATA[配置centos7 网卡， xshell 登录]]></description><category></category></item><item><title><![CDATA[Leetcode My calender]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/78578686</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/78578686</guid><author>sundawei2016</author><pubDate>Mon, 20 Nov 2017 05:06:33 +0800</pubDate><description><![CDATA[My calendar I

Implement a MyCalendar class to store your events. A new event can be added if adding
 the event will not cause a double booking.

Your class will have the method, book(int start, ]]></description><category></category></item><item><title><![CDATA[Leetcode 230. Kth Smallest Element in a BST]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/78146258</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/78146258</guid><author>sundawei2016</author><pubDate>Sun, 01 Oct 2017 08:53:12 +0800</pubDate><description><![CDATA[Given a binary search tree, write a function kthSmallest to find the kth
 smallest element in it.

Note: 
You may assume k is always valid, 1 ≤ k ≤ BST's total elements.

给一个BST， 找到第 K 小的数

方法]]></description><category></category></item><item><title><![CDATA[Leetcode Combination]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77670400</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77670400</guid><author>sundawei2016</author><pubDate>Tue, 29 Aug 2017 12:27:40 +0800</pubDate><description><![CDATA[Combination Sum 1

Given a set of candidate numbers (C) (without duplicates) and a target number (T),
 find all unique combinations in C where the candidate numbers sums to T.

The same repeated ]]></description><category></category></item><item><title><![CDATA[recursive and iterative ways to reverse a LinkedList]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77662512</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77662512</guid><author>sundawei2016</author><pubDate>Tue, 29 Aug 2017 04:58:02 +0800</pubDate><description><![CDATA[public ListNode reverseList(ListNode head) {
        return helper(head, null);
    }
    private ListNode helper(ListNode head, ListNode newHead) {
        if (head == null) return newHead;
        L]]></description><category></category></item><item><title><![CDATA[Read N Characters Given Read4]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77258855</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77258855</guid><author>sundawei2016</author><pubDate>Wed, 16 Aug 2017 19:55:34 +0800</pubDate><description><![CDATA[The API: int read4(char *buf) reads 4 characters at a time from a file.

The return value is the actual number of characters read. For example, it returns 3 if there is only 3 characters left in the]]></description><category></category></item><item><title><![CDATA[Leetcode 174. Dungeon Game]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77253523</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77253523</guid><author>sundawei2016</author><pubDate>Wed, 16 Aug 2017 16:57:47 +0800</pubDate><description><![CDATA[The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K)
 was initially p]]></description><category></category></item><item><title><![CDATA[Leetcode 269. Alien Dictionary]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77205193</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77205193</guid><author>sundawei2016</author><pubDate>Wed, 16 Aug 2017 00:59:20 +0800</pubDate><description><![CDATA[There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty words from the dictionary, where words are sorted
 le]]></description><category></category></item><item><title><![CDATA[Leetcode 130. Surrounded Regions]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77196330</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77196330</guid><author>sundawei2016</author><pubDate>Tue, 15 Aug 2017 16:20:29 +0800</pubDate><description><![CDATA[Given a 2D board containing 'X' and 'O' (the letter O),
 capture all regions surrounded by 'X'.

A region is captured by flipping all 'O's into 'X's
 in that surrounded region.

For example,

]]></description><category></category></item><item><title><![CDATA[Leetcode 658. Find K Closest Elements]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/77170876</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/77170876</guid><author>sundawei2016</author><pubDate>Mon, 14 Aug 2017 22:45:16 +0800</pubDate><description><![CDATA[Given a sorted array, two integers k and x,
 find the k closest elements to x in
 the array. The result should also be sorted in ascending order. If there is a tie, the smaller elements are always p]]></description><category></category></item><item><title><![CDATA[Leetcode 126. Word Ladder II]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/76731671</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/76731671</guid><author>sundawei2016</author><pubDate>Sat, 05 Aug 2017 18:44:34 +0800</pubDate><description><![CDATA[Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that:

Only one letter can be changed at a timeEac]]></description><category></category></item><item><title><![CDATA[word break/pattern/ladder]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/76641281</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/76641281</guid><author>sundawei2016</author><pubDate>Sat, 05 Aug 2017 18:36:24 +0800</pubDate><description><![CDATA[139. Word Break

Given a non-empty string s and
 a dictionary wordDict containing
 a list of non-empty words,
 determine if s can be segmented
 into a space-separated sequence of one or more dic]]></description><category></category></item><item><title><![CDATA[Leetcode Best Time to Buy and Sell Stock 全集]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/76601981</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/76601981</guid><author>sundawei2016</author><pubDate>Thu, 03 Aug 2017 01:53:51 +0800</pubDate><description><![CDATA[Best Time to Buy and Sell Stock I

Say you have an array for which the ith element is the price of a given stock on day i.

If you were only permitted to complete at most one transaction (ie, buy ]]></description><category></category></item><item><title><![CDATA[Leetcode 395. Longest Substring with At Least K Repeating Characters]]></title><link>https://blog.youkuaiyun.com/sundawei2016/article/details/76599422</link><guid>https://blog.youkuaiyun.com/sundawei2016/article/details/76599422</guid><author>sundawei2016</author><pubDate>Wed, 02 Aug 2017 22:35:20 +0800</pubDate><description><![CDATA[Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appears no
 less than k times.

Example 1:
Input:
s = "aaabb", k = ]]></description><category></category></item></channel></rss>