自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

reigns的博客

不会vim不用三目

  • 博客(48)
  • 论坛 (1)
  • 收藏
  • 关注

原创 飞塔防火墙的配置与策略

最近帮助一家公司做网络维护,公司的防火墙是飞塔的,做了一些配置,对防火墙和访问策略有了进一步熟悉。配置信息:固件版本200B,os版本4.0再看看接口信息。可以看到,port15是外网接口,port9是内网接口。看下面这一段策略设置:可以看到有线网(Wired),无线网(Wireless),无线网访客(Wireless-Guest)都可访问外网(Wired-port1...

2018-12-25 09:59:20 9858

原创 LeetCode-752. Open the Lock

You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn...

2018-12-19 15:30:07 40

原创 LeetCode-22. Generate Parentheses

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", "()(())"...

2018-12-18 20:39:05 62

原创 LeetCode-329. Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path.From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside o...

2018-12-18 10:26:27 50

原创 LeetCode-206. Reverse Linked List

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 or recursi...

2018-12-17 21:56:33 54

原创 LeetCode-725. Split Linked List in Parts

Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts".The length of each part should be as equal as possible: no two part...

2018-12-13 23:10:33 50

原创 LeetCode-46. Permutations

Given a collection of distinct integers, 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]]题解:class Solution...

2018-12-13 22:34:14 53

原创 LeetCode-318. Maximum Product of Word Lengths

Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case lett...

2018-12-13 21:52:19 64

原创 LeetCode-150. Evaluate Reverse Polish Notation

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

2018-12-13 20:26:32 46

原创 LeetCode-18. 4Sum

Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of tar...

2018-12-13 15:48:13 48

原创 LeetCode-645. Set Mismatch

The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to anothernumber in the set, which results in repetition of on...

2018-12-13 15:35:28 47

原创 LeetCode-17. Letter Combinations of a Phone Number

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is giv...

2018-12-13 14:36:11 44

原创 LeetCode-16. 3Sum Closest

Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would ...

2018-12-12 22:58:28 45

原创 LeetCode-15. 3Sum

Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not cont...

2018-12-12 22:39:15 46

原创 LeetCode-11. Container With Most Water

Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two...

2018-12-12 20:38:02 57

原创 LeetCode-5. Longest Palindromic Substring

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

2018-12-12 20:07:47 53

原创 LeetCode-3. Longest Substring Without Repeating Characters

Given a string, find the length of thelongest substringwithout repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2:...

2018-12-12 19:15:01 41

原创 LeetCode-485. Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutive 1...

2018-12-12 17:58:42 72 1

原创 LeetCode-669. Trim a Binary Search Tree

Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the tree, so the re...

2018-12-11 21:32:13 33

原创 LeetCode-953. Verifying an Alien Dictionary

In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters.Given a sequence of ...

2018-12-11 20:12:51 232 1

原创 LeetCode-884. Uncommon Words from Two Sentences

We are given two sentences A and B.  (A sentence is a string of space separated words.  Each word consists only of lowercase letters.)A word is uncommon if it appears exactly once in one of the sent...

2018-12-11 19:27:02 153

原创 LeetCode-766. Toeplitz Matrix

A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element.Now given an M x N matrix, return True if and only if the matrix is Toeplitz. Example 1:Input:matrix ...

2018-12-11 19:10:33 57

原创 LeetCode-872. Leaf-Similar Trees

Consider all the leaves of a binary tree.  From left to right order, the values of those leaves form a leaf value sequence.For example, in the given tree above, the leaf value sequence is (6, 7, 4...

2018-12-11 18:45:57 87

原创 LeetCode-500. Keyboard Row

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.  Example:Input: ["Hello", "Alaska", "Dad", "...

2018-12-06 23:00:36 31

原创 LeetCode-821. Shortest Distance to a Character

Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string.Example 1:Input: S = "loveleetcode", C = 'e'Output: [3, 2, 1...

2018-12-06 22:46:46 31

原创 LeetCode-476. Number Complement

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the range of a 3...

2018-12-06 22:30:34 25

原创 LeetCode-557. Reverse Words in a String III

Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:Input: "Let's take LeetCode contest"...

2018-12-06 22:16:00 45

原创 LeetCode-559. Maximum Depth of N-ary Tree

Given a n-ary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.For example, given a 3-ary tree: ...

2018-12-06 22:05:36 35

原创 LeetCode-876. Middle of the Linked List

Given a non-empty, singly linked list with head node head, return a middle node of linked list.If there are two middle nodes, return the second middle node. Example 1:Input: [1,2,3,4,5]Outpu...

2018-12-06 21:56:00 59

原创 LeetCode-589. N-ary Tree Preorder Traversal

Given an n-ary tree, return the preorder traversal of its nodes' values.For example, given a 3-ary tree:  Return its preorder traversal as: [1,3,5,6,2,4]. Note:Recursive solution is tr...

2018-12-06 21:43:42 83

原创 LeetCode-590. N-ary Tree Postorder Traversal

Given an n-ary tree, return the postorder traversal of its nodes' values.For example, given a 3-ary tree:  Return its postorder traversal as: [5,6,3,2,4,1]. Note:Recursive solution is ...

2018-12-06 21:37:52 49

原创 LeetCode-922. Sort Array By Parity II

Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even.Sort the array so that whenever A[i] is odd, i is odd; and whenever A[i] is even, i is...

2018-12-05 21:43:58 55

原创 LeetCode-852. Peak Index in a Mountain Array

Let's call an array A a mountain if the following properties hold:A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ....

2018-12-05 21:28:48 67

原创 LeetCode-942. DI String Match

Given a string S that only contains "I" (increase) or "D" (decrease), let N = S.length.Return any permutation A of [0, 1, ..., N] such that for all i = 0, ..., N-1:If S[i] == "I", then A[i] < A...

2018-12-05 21:18:53 87

原创 LeetCode-617. Merge Two Binary Trees

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary tree...

2018-12-05 20:48:42 39

原创 LeetCode-461. Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note:0 ≤ x, y < 23...

2018-12-05 20:08:14 45

原创 LeetCode-832. Flipping an Image

Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.To flip an image horizontally means that each row of the image is reversed.  For examp...

2018-12-05 19:50:20 61

原创 LeetCode-657. Robot Return to Origin

There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes its moves.The move sequence is repres...

2018-12-05 19:36:58 29

原创 LeetCode-905. Sort Array By Parity

Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.You may return any answer array that satisfies this conditi...

2018-12-05 19:27:50 27

原创 LeetCode-804. Unique Morse Code Words

International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to ".-", "b" maps to "-...", "c" maps to "-.-.", and so on.F

2018-12-05 19:13:48 46

空空如也

ReignsDu的留言板

发表于 2020-01-02 最后回复 2020-01-02

空空如也

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

TA关注的人 TA的粉丝

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