2019年8月14日

摘要: 1 public class PerfectNumber { 2 /** 3 * 507. Perfect Number 4 * Easy 5 * 6 * We define the Perfect Number is a positive integer that is equal to the sum of all its posi... 阅读全文

posted @ 2019-08-14 14:36 玛格汉程序猿 阅读(151) 评论(0) 推荐(0)

摘要: 1 import java.util.ArrayList; 2 import java.util.List; 3 4 public class Combinations { 5 /** 6 * 77. Combinations 7 * Medium 8 * Given two integers n and k, return all pos... 阅读全文

posted @ 2019-08-14 14:34 玛格汉程序猿 阅读(162) 评论(0) 推荐(0)

摘要: 1 public class SumRoot2LeafNumbers { 2 /** 3 * 129. Sum Root to Leaf Numbers 4 * Medium 5 * 6 * Given a binary tree containing digits from 0-9 only, each root-to-leaf pa... 阅读全文

posted @ 2019-08-14 14:33 玛格汉程序猿 阅读(121) 评论(0) 推荐(0)

2019年8月9日

摘要: 1 import java.util.ArrayList; 2 import java.util.List; 3 4 public class Permutations { 5 /** 6 * 46. Permutations 7 * Medium 8 * 9 * Given a collection of distinct integers, return all possible permut 阅读全文

posted @ 2019-08-09 19:15 玛格汉程序猿 阅读(114) 评论(0) 推荐(0)

摘要: import java.util.Arrays; import java.util.PriorityQueue; public class MinimumCost2HireKWorkers { /** * 857. Minimum Cost to Hire K Workers * Hard * * There are N workers. The i-th worker has a quality 阅读全文

posted @ 2019-08-09 19:14 玛格汉程序猿 阅读(131) 评论(0) 推荐(0)

摘要: **简单直接,上代码,开封即食** ***yml文件内容配置*** ***DruidConfig文件*** ***DruidProperties文件*** 阅读全文

posted @ 2019-08-09 18:20 玛格汉程序猿 阅读(3855) 评论(0) 推荐(0)

摘要: 1 import java.util.LinkedList; 2 import java.util.Queue; 3 4 public class Dota2Senate { 5 /** 6 * 649. Dota2 Senate 7 * Medium 8 * <p> 9 * In the world of Dota2, there are two parties: the Radiant and 阅读全文

posted @ 2019-08-09 17:46 玛格汉程序猿 阅读(179) 评论(0) 推荐(0)

摘要: 1 import java.util.*; 2 3 public class CheapestFlightsWithinKStops { 4 /** 5 * 787. Cheapest Flights Within K Stops 6 * Medium 7 * <p> 8 * There are n cities connected by m flights. Each fight starts 阅读全文

posted @ 2019-08-09 17:45 玛格汉程序猿 阅读(156) 评论(0) 推荐(0)

2019年8月6日

摘要: 1 import java.util.ArrayList; 2 import java.util.List; 3 4 public class SelfDividingNumbers { 5 /** 6 * 728. Self Dividing Numbers 7 * Easy 8 * 9 * A self-dividing ... 阅读全文

posted @ 2019-08-06 14:22 玛格汉程序猿 阅读(119) 评论(0) 推荐(0)

摘要: 1 public class JumpGame2 { 2 /** 3 * 45. Jump Game II 4 * Hard 5 * Given an array of non-negative integers, you are initially positioned at the first index of the array. 6 ... 阅读全文

posted @ 2019-08-06 11:39 玛格汉程序猿 阅读(121) 评论(0) 推荐(0)