14 yexianyi

尚未进行身份认证

Software Architect @ Siemens

等级
TA的排名 3k+

Leetcode: 209. Minimum Size Subarray Sum

Given an array ofnpositive integers and a positive integers, find the minimal length of acontiguoussubarray of which the sum ≥s. If there isn't one, return 0 instead.Example:Input: s = 7, ...

2020-01-22 17:14:17

Leetcode: 207. Course Schedule

There are a total ofncourses you have to take, labeled from0ton-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair...

2020-01-22 14:21:01

Leetcode:179. Largest Number

Given a list of non negative integers, arrange them such that they form the largest number.Example 1:Input: [10,2]Output: "210"Example 2:Input: [3,30,34,5,9]Output: "9534330"Note:The r...

2020-01-20 16:12:57

Leetcode 152:Maximum Product Subarray

Given an integer arraynums, find the contiguous subarray within an array (containing at least one number) which has the largest product.Example 1:Input: [2,3,-2,4]Output: 6Explanation:[2,3] h...

2020-01-20 13:57:35

Leetcode 150: Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.Note:Division between two integers ...

2020-01-19 13:04:26

Leetcode 148: Sort List

Sort a linked list inO(nlogn) time using constant space complexity.Example 1:Input: 4->2->1->3Output: 1->2->3->4Example 2:Input: -1->5->3->4->0Output: -1-...

2020-01-10 15:10:44

LeetCode 146:LRU Cache

Design and implement a data structure forLeast Recently Used (LRU) cache. It should support the following operations:getandput.get(key)- Get the value (will always be positive) of the key if th...

2020-01-09 17:15:31

Leetcode 143: Reorder List

143.Reorder ListGiven a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You maynotmodify the values in the list's nodes, only nodes itself may be changed.Example ...

2019-12-23 17:34:46

Leetcode: 139 Word Break

139.Word BreakGiven anon-emptystringsand a dictionarywordDictcontaining a list ofnon-emptywords, determine ifscan be segmented into a space-separated sequence of one or more dictionary wo...

2019-12-16 18:28:21

Leetcode 127: Word Ladder

127.Word LadderGiven two words (beginWordandendWord), and a dictionary's word list, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Only one letter can ...

2019-12-16 16:20:57

Leetcode 91. Decode Ways

A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given anon-emptystring containing only digits, determine t...

2019-12-09 14:53:21

LeetCode:5. Longest Palindromic Substring

Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000.Example 1:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.Exa...

2019-09-06 19:03:27

LeetCode:3. Longest Substring Without Repeating Characters

3.Longest Substring Without Repeating CharactersMediumGiven a string, find the length of thelongest substringwithout repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation...

2019-09-06 17:21:32

Eureka: example of creating 3 nodes Eureka Server with docker

Abstract:In this artical, it will state how to create 3 nodes Eureka Server with docker.Step1. Create Eureka ServerSource:https://github.com/yexianyi/Chukonu/tree/master/chukonu-springcloud-eur...

2019-06-13 19:09:35

Eureka Issue: replicas is not working

Problem:When we create 3-nods Eureka server and register them with each other, you may find the replica is not working.Reason:Each of node must have an unique"eureka.instance.hostname". Differe...

2019-06-13 16:12:50

Mysql Lock with different isolation level

0. PreparationCREATE TABLE `test` ( `id` int(11) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, UNIQUE KEY `test_id_IDX` (`id`) USING BTREE) ENGINE=InnoDB DEFAULT CHARSET=utf8;1.Read...

2019-05-28 11:24:31

MySQL InnoDB: Intention Lock

This artical states how doesIntention Lock work inMySql Server 8.0. Firstly, atesting database and table with seed data will be created. After that, we will see the difference when the table with U...

2019-05-13 17:02:59

How to config VirtualVM Remote Monitoring with JMX

nohup java \ -server \ -Dcom.sun.management.jmxremote=true \ -Dcom.sun.management.jmxremote.port=8887 \ -Dcom.sun.management.jmxremote.rmi.port=8886 \ -Dcom.sun.management.jmxremote.authenticate...

2018-11-29 10:42:43

Java8 Useful Usage

Convert List<String> to String list.stream().map(Object::toString).collect(Collectors.joining(","));  

2018-11-07 11:40:50

How to install Redis on Linux env

1. Download Redishttp://download.redis.io/releases/redis-4.0.10.tar.gz2. Unzip package (e.g. /home/redis) tar xzvf redis-4.0.10.tar.gz3. Make filecd redis-4.0.10makecd srcmake allmak...

2018-08-14 13:34:26

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv2
    勤写标兵Lv2
    授予每个自然周发布4篇到6篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。