原创 leetCode 292. Nim Game
題目連接:https://leetcode.com/problems/nim-game/ 題目內容: You are playing the following Nim Game with your friend: T
原创 leetCode 283. Move Zero
題目鏈接:https://leetcode.com/problems/move-zeroes/ 題目內容: Given an array nums, write a function to move all 0's
原创 leetCode 328. Odd Even Linked List
題目鏈接:https://leetcode.com/problems/odd-even-linked-list/ 題目內容: Given a singly linked list, group all
原创 leetCode 100. Same Tree
題目鏈接:https://leetcode.com/problems/same-tree/ 題目內容: Given two binary trees, write a function to check if they
原创 leetCode 226. Invert Binary Tree
題目鏈接:https://leetcode.com/problems/invert-binary-tree/ 題目內容: Invert a binary tree. 4 / \ 2 7
原创 遠程桌面設置
1、右鍵“計算機(win7)”或者“此電腦(win10)”,在左側選擇“遠程設置”,並設置爲如圖所示 2、如果客戶機連接的時候顯示連接不上,有如下幾種情況:1)目標機長時間待機自動轉化爲休眠,因此必須提前設置目標機從不睡眠 2)目標機
原创 leetCode 242. Valid Anagram
題目鏈接:https://leetcode.com/problems/valid-anagram/ 題目內容: Given two strings s and t, write a function to determ
原创 leetCode 191. Number of 1 Bits
題目鏈接:https://leetcode.com/problems/number-of-1-bits/ 題目內容: Write a function that takes an unsigned integer an
原创 Java讀寫文件的編碼問題
在處理一些日誌文件的時候,由於數據來源的服務端跟本地處理的編碼不一致,會出現許多亂七八糟的問題,比如無緣無故在文件首多了一些字符,或者寫入文件的時候少了一些內容,又或者亂碼無法顯示等。因此,在讀寫文件的時候,讀入數據流時要指明格式
原创 POM.xml參考
原文出處:http://lavasoft.blog.51cto.com/62575/1388866 作者:熔岩 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://
原创 leetCode 206. Reverse Linked List
題目鏈接:https://leetcode.com/problems/reverse-linked-list/ 題目內容: Reverse a singly linked list. click to
原创 leetCode 237. Delete Node in a Linked List
題目鏈接:https://leetcode.com/problems/delete-node-in-a-linked-list/ 題目內容: Write a function to delete a node (exc
原创 scala中的var,val,immutable,mutable理解小結
最近項目要用到spark平臺,無論是看源碼還是寫程序都需要用scala語言,接觸了兩天之後,對映射Map這裏有點疑問,做了點測試之後記一記自己的想法。 首先,在scala中定義變量有var和val兩種方式,前者
原创 leetCode 8. String to Integer (atoi)
題目連接:https://leetcode.com/problems/string-to-integer-atoi/ 題目內容: Implement atoi to convert a string to an int
原创 鏈表添加函數中爲什麼要用指向鏈表指針的指針
在看書的時候有個往鏈表裏添加節點的函數,代碼中考慮到可能給出的頭指針爲空,並做另外一些處理。具體代碼如下: #include <iostream> #include <string> using namespace st