8 林下溪源

尚未进行身份认证

我要认证

为学日益,为道日损

等级
TA的排名 4w+

60. Permutation Sequence

Problem Description:The set[1,2,3,...,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order, we get the following sequence forn= 3:"123" "132" "213" "231" "312" "321"Givennandk, return the...

2020-08-03 17:49:54

58. Length of Last Word

Problem Description:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string.If the last word does not ...

2020-08-03 17:22:25

52. N-Queens II

Problem Description:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return the number ofdistinct solutions to then-queens puzzle.Example:Input: 4Output...

2020-07-30 16:11:14

51. N-Queens

Problem Description:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinct solutions to then-queens puzzle.Each solution contains a distinct bo...

2020-07-30 16:03:39

50. Pow(x, n)

Problem Description:Implementpow(x,n), which calculatesxraised to the powern(xn).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100Example 3:Input: 2.00000, -2Output: 0.25000Explanation: 2...

2020-07-29 15:35:14

47. Permutations II

Problem Description:Given a collection of numbers that might contain duplicates, return all possible unique permutations.Example:Input: [1,1,2]Output:[ [1,1,2], [1,2,1], [2,1,1]]Code:class Solution { List<List<Integer&

2020-07-29 14:25:40

46. Permutations

Problem Description:Given a collection ofdistinctintegers, return all possible permutations.Example:Input: [1,2,3]Output:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]Code:class Solution { List<List<Integer..

2020-07-29 12:21:28

44. Wildcard Matching

Problem Description:Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching ...

2020-07-28 18:16:36

SpringBoot JPA MySQL 遇到中文乱码的解决办法

在SpringBoot JPA中使用MySQL时, 数据库的值为中文乱码, 需要如下两个方面的设置,1. 数据库的编码为UTF-8, 或者GB2312 也可以.ALTER SCHEMA `YourDBName` DEFAULT CHARACTER SET utf8 ;2. 更改Springboot的配置文件, 更改MySQL链接如下spring.datasource.url= jdbc:mysql://localhost:3306/YourDBName?characterEnco...

2020-06-02 15:52:46

700. Search in a Binary Search Tree

Problem Description:Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node's value equals the given value. Return the subtree rooted with that node. If such node doesn't exist, you should return

2020-06-01 18:11:00

整理一些除了Google Adsense以外比较适合英文站的国外广告联盟

最近一直在研究除了google adsense 以外的其他适合英文站的国外广告联盟,以替代被google adsense k站中的广告,不然不错的流量就太可惜了,在网上搜索,整理出如下几个口碑不错的广告联盟。如果你有其他更好的广告联盟,欢迎大家留言补充啊!infolinks- 一个内文广告联盟,效果很好,除adsense外必做的广告,因为它并不影响adsense的广告位,相当于多一份收入。支持paypal付款。adbrite– 跟adsense类似的关键字广告,不过广告形式比google多,如.

2020-05-09 12:06:14

237. Delete Node in a Linked List

Problem:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Given linked list --head =[4,5,1,9], which looks like following:Exampl...

2020-03-26 11:42:07

234. Palindrome Linked List

Problem:Given a singly linked list, determine if it is a palindrome.Example 1:Input: 1->2Output: falseExample 2:Input: 1->2->2->1Output: trueFollow up:Could you do it in ...

2020-03-24 12:26:14

206. Reverse Linked List

Problem:Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed either iteratively...

2020-03-24 12:20:29

203. Remove Linked List Elements

Problem:Remove all elements from a linked list of integers that have valueval.Example:Input: 1->2->6->3->4->5->6, val = 6Output: 1->2->3->4->5Analysis:本题的...

2020-03-24 12:08:04

160. Intersection of Two Linked Lists

Problem:Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:begin to intersect at node c1.Example 1:...

2020-03-24 11:51:07

148. Sort List

Problem: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->0...

2020-03-23 18:08:21

Java的特点

Java是一种“简单”、面向对象、分布式、解释型、健壮、安全、体系结构中立、可移植、高性能和动态的变成语言。简单:Java的设计目的是让专业程序员觉得既易学又好用。假设你有编程经历,你将不觉得Java难掌握,如果你已经理解面向对象编程的基本概念,学习Java更加容易; 面向对象:面向对象是现代编程语言的重要特征之一,面向对象技术极大地提高了人们的软件开发能力; 分布式:分布式包括数据分布和...

2020-03-23 15:24:19

Java 概述

一、Java 简介 Java是一种可以撰写跨平台应用程序的面向对象的程序设计语言。Java技术具有卓越的通用性、高效性、平台移植性和安全性,广泛应用于PC,数据中心,游戏控制台、科学超级计算机,移动电话和互联网,同时拥有全球最大的开发者专业社群。 Java是由Sum Microsystems公司推出的Java面向对象程序设计语言(以下简称Java语言)和Java平台的总称。由J...

2020-03-23 12:13:25

147. Insertion Sort List

Problem:Sort a linked list using insertion sort.A graphical example of insertion sort. The partial sorted list (black) initially contains only the first element in the list.With each iteration ...

2020-03-20 18:11:53

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 1024勋章
    1024勋章
    #1024程序员节#活动勋章,当日发布原创博客即可获得
  • 勤写标兵Lv4
    勤写标兵Lv4
    授予每个自然周发布9篇以上(包括9篇)原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。