自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小雄鹿的博客

小雄鹿的笔记本兼小黑板,愿意围观的就围观一下吧

  • 博客(212)
  • 资源 (1)
  • 收藏
  • 关注

转载 深入理解jvm装载约束

原文来自:i flym本文地址:https://www.iflym.com/index.php/code/understand-jvm-load-constraint.html   网上进行google或者baidu时,以及在使用tomcat或者其它框架时,经常碰到以下的问题:12ava.lang.LinkageError: loader constraint violation: when re...

2018-06-13 15:51:31 400

原创 Substring with Concatenation of All Words:判断目标串包含排列组合的模式串的起始位置

You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and wi...

2018-06-06 21:18:55 634

原创 Course Schedule II:判断有向图是否有环

There are a total of n courses you have to take, labeled from 0 to n-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: ...

2018-06-06 09:03:54 293

原创 Implement Stack using Queues:使用队列表示栈

Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Return whether ...

2018-06-05 21:28:57 646

原创 Implement Queue using Stacks:用栈实现队列

Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empty() --...

2018-06-05 20:58:46 334

翻译 Single Number II:统计唯一一个出现次数不同的数字

Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one.Note:Your algorithm should have a linear runtime complexity. Cou...

2018-06-04 15:42:21 466

原创 Palindrome Partitioning:穷举所有回文段

Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:Input: "aab"Output:[ ["aa","b"], ["a","a","b&quot

2018-06-04 09:29:15 182

转载 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 dictionary words.Note:The same...

2018-06-01 15:52:41 254

原创 Binary Tree Postorder Traversal:迭代后续遍历二叉树

Given a binary tree, return the postorder traversal of its nodes' values.Example:Input: [1,null,2,3] 1 \ 2 / 3Output: [3,2,1]Follow up: Recursive solution is trivial, could you d...

2018-06-01 15:04:40 338

原创 Populating Next Right Pointers in Each Node II:非完全二叉树构建链表

Given a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next;}Populate each next pointer to point to its next right node. If there is no next right node...

2018-06-01 14:00:37 212

原创 Populating Next Right Pointers in Each Node:将完全二叉树改成带链表的二叉树

Given a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next;}Populate each next pointer to point to its next right node. If there is no next right node...

2018-06-01 10:13:43 216

原创 Path Sum:判断求根节点到叶子节点求和大小

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Note: A leaf is a node with no children.Example:Give...

2018-05-31 21:31:48 313

原创 Construct Binary Tree from Inorder and Postorder Traversal:由中序后序遍历构造二叉树

Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.For example, giveninorder = [9,3,15,20,7]postorder = [9,15,7,20...

2018-05-31 21:18:37 163

转载 Linked List Cycle II:判断链表有环并找出最开始的循环位置

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up:Can you solve it without using extra space?下文转载自:http://www...

2018-05-31 19:44:16 512

原创 Convert Sorted List to Binary Search Tree:将有序链表转化成二叉搜索树

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is defined as a binary tree in which the de...

2018-05-31 16:16:47 179

原创 Longest Consecutive Sequence:无序数列中查找最长连续子串长度

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example:Input: [100, 4, 200, 1, 3, 2]Output: 4Explanati...

2018-05-31 15:30:03 326

原创 Binary Tree Zigzag Level Order Traversal:锯齿打印二叉树

Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).For example:Given binary tree [...

2018-05-31 14:56:21 188

原创 Symmetric Tree:判断二叉树是否是对称结构

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the...

2018-05-31 08:38:50 230

转载 Merge Two Sorted Lists:归并数组

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: 1->1...

2018-05-30 21:48:02 160

原创 Merge k Sorted Lists:多列有序数列归并

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[  1->4->5,  1->3->4,  2->6]Output: 1->1->2->3->4->4...

2018-05-30 20:53:39 233

原创 Remove Duplicates from Sorted Array:排序数组去重

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifying...

2018-05-30 19:37:00 463

原创 Range Sum Query 2D - Immutable:二维数组求和

Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).The above rectangle (with the red border) ...

2018-05-29 19:52:08 217

原创 Basic Calculator II:计算字符串算式

Implement a basic calculator to evaluate a simple expression string.The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division should trunc...

2018-05-21 08:35:20 146

原创 Minimum Swaps To Make Sequences Increasing:交换元素变为升序

We have two integer sequences A and B of the same non-zero length.We are allowed to swap elements A[i] and B[i]. Note that both elements are in the same index position in their respective sequences.At...

2018-05-20 17:28:55 195

原创 Sort List:链表归并排序

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

2018-05-18 10:09:54 100

原创 Reach a Number:相邻递增步数搜索目标

You are standing at position 0 on an infinite number line. There is a goal at position target.On each move, you can either go left or right. During the n-th move (starting from 1), you take n steps.Re...

2018-05-17 21:34:40 147

原创 Reorder List:穿插反转链表

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You may not modify the values in the list's nodes, only nodes itself may be changed.Example 1:Given 1->2->3-&g...

2018-05-16 14:29:06 206

原创 Coin Change:用硬币表示的背包问题

You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money ...

2018-05-07 20:51:33 298

翻译 Valid Parenthesis String:带*号的括号匹配

Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the validity of a string by these rules:Any left parenthes...

2018-04-24 08:46:12 442

原创 Minimum Height Trees:无环无向图转化成最矮的树

For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called mini...

2018-04-20 09:26:20 259

原创 Next Greater Element III:刚好大的组成相似整数

Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive 32-bit i...

2018-04-19 09:47:09 214

原创 Champagne Tower:香槟塔(塔型数组向下传递元素)

We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row.  Each glass holds one cup (250ml) of champagne.Then, some champagne is pour...

2018-04-18 09:47:13 1060 1

原创 Rotate List:翻折链表

Given a linked list, rotate the list to the right by k places, where k is non-negative.Example 1:Input: 1->2->3->4->5->NULL, k = 2Output: 4->5->1->2->3->NULLExplanation...

2018-04-17 21:49:43 114

原创 Add and Search Word - Data structure design:字典树添加查找

Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a regular expression string containing only letters a-...

2018-04-16 09:31:26 119

原创 字符串处理中的错误:05279

问题现场:        今天我编写一个简单的主题爬虫,需要从文件爱你里读取主题字符串,然后对网页中的锚文本匹配,比如主题词s1是“党”,锚文本s2是“全面从严治党”,那么s2包含主题词。但是出现问题:s2.contains(s1) 返回结果是false。问题分析过程:    既然不匹配,那么打印两个字符串看看,从控制台上用肉眼观查没有发现特殊的异样。    分析两个字符串长度:s1.length...

2018-04-15 21:07:56 160

原创 Water and Jug Problem:容器盛水

You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it is possible to measure exactly z litres using these two j...

2018-04-13 08:59:11 357

原创 Clone Graph:无向有环图复制

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for each node, and...

2018-04-11 09:02:42 194

原创 Continuous Subarray Sum

Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k, that is, sums up to ...

2018-04-10 09:09:28 162

原创 Largest Number:组合数字生成最大数值

Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result may be very large...

2018-04-09 13:12:54 825

原创 JAVA开源爬虫 WebMagic 与 WebCollector 之间比较

WebMagic与WebCollector比较一、架构 Webcollector图片来自官方文档 WebMagic二、维护者WebMegic:董亿华,前点评工程师,现自主创业WebCollector::合肥工业大学DMIC三、最近更新时间(截止至2018.4.8)WebMegic: 2017.12WebCollector: 2018.3 四、活跃度(以github上issuse数目评价,截止至20...

2018-04-08 16:43:31 3729 1

数据库技术课后习题答案

数据库技术课后习题答案,希望能有用,长安大学2015年数据库教材的课后答案

2016-02-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除