原创 LeetCode(147)-insertion-sort-list(鏈表插入排序)

題目描述 Sort a linked list using insertion sort. public class l147_insertion_sort_list { class ListNode{

原创 leetcode-word-break

題目描述 給定一個字符串s和一個詞典詞典dict,確定s是否可以分割成一個或多個詞典單詞的空格分隔序列。 例如,給定 s =“leetcode”, dict = [“leet”,“code”]。 因爲“leetcode”可以分

原创 酷家樂一面-停車場記錄

編寫一個程序,做一個簡易的停車場使用數據記錄儀。 此程序能夠監聽命令行輸入,命令行可以輸入三類命令:(下述命令中的參數值均爲舉例,實際使用中不會限定數值) 1: checkin –t=225959 –n=AT4257 2: c

原创 Leetcode(78)-subsets

Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-descend

原创 劍指-調整數組順序

題目描述 輸入一個整數數組,實現一個函數來調整該數組中數字的順序,使得所有的奇數位於數組的前半部分,所有的偶數位於位於數組的後半部分,並保證奇數和奇數,偶數和偶數之間的相對位置不變。 1.空間換時間 #include <ios

原创 酷家樂筆試

題目(類似): s = “3[a]2[bc]”, return “aaabcbc”. s = “3[a2[c]]”, return “accaccacc”. #include <iostream> using namesp

原创 劍指-鏈表中倒數第K個節點

主要要增強代碼魯棒性,考慮邊界條件 #include <iostream> using namespace std; struct ListNode { int val; struct ListNode *nex

原创 LeetCode(1)--two sum兩數之和

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may a

原创 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 i

原创 LeetCode(105)-Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do

原创 劍指-順時針打印矩陣

題目描述 輸入一個矩陣,按照從外向裏以順時針的順序依次打印出每一個數字,例如,如果輸入如下矩陣: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 則依次打印出數字1,2,3,4,8,12,16,15

原创 LeetCode(170)_add and find

Design and implement a TwoSum class. It should support the following operations:add and find. add - Add the number

原创 LeetCode(2)-add 2 numbers(兩個鏈表相加)

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and ea

原创 讀取request請求中的body值、參數值

方法1: 例如postman測試,請求攜帶的body值爲: {“username”:“abc”, “password”:“123” } 寫restful登錄接口時需要用到username的值進行比對 應用:將請求值與正確的登錄用戶名密

原创 myeclipse安裝與破解

https://blog.csdn.net/qq_37791451/article/details/80491986 親測可以,安利。