原创 LeetCode算法題——25. Reverse Nodes in k-Group
題目: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positiv
原创 Spring 鬆耦合實例
假定我們現在需要輸出不同格式文件,傳統實現方式如下: 1 創建輸出文件接口IGenerateFile.java package com.xidian.edu; public interface IGenerateFile {
原创 LeetCode算法題——14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. 算法思想:逐個比對每個字符串的前綴字符,若出現不相等或者其中某個
原创 LeetCode算法題——15. 3Sum
題目: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets
原创 LeetCode算法題——17. Letter Combinations of a Phone Number
題目 Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit
原创 LeetCode算法題——24. Swap Nodes in Pairs
題目: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you shoul
原创 Python面向對象編程(5)——類的特殊方法
類的特殊方法 1 深入理解類 類本質上也是一個對象,只是其擁有創建自身實例的能力 類可以與變量進行綁定,並且可以爲類增加屬性 可以把類作爲函數的參數傳遞 2 元類 類的創建和管理者(type),
原创 LeetCode算法題——22. Generate Parentheses
題目: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For exam
原创 LeetCode算法題——23. Merge k Sorted Lists
題目: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Subscribe
原创 LeetCode算法題——12. Integer to Roman
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 求出所給數字的個
原创 LeetCode算法題——21. 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 node
原创 LeetCode算法題——13. Roman to Integer
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 針對羅馬字符出現
原创 LeetCode算法題——27. Remove Element
題目: Given an array and a value, remove all instances of that value in place and return the new length. Do not alloc
原创 JAVA Spring HelloWord實現
IDE:IntelliJ IDEA 2017 HelloWord.java package com.xidian.edu; public class HelloWorld { private String name;
原创 LeetCode算法題——26. Remove Duplicates from Sorted Array
題目: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new l