原创 滑動窗口(三)——Longest K unique characters substring(最長k個不同字符子串)

題目: Given a string you need to print the size of the longest possible substring that has exactly k unique characte

原创 滑動窗口(二)——leetcode No. 904. Fruit Into Baskets(籃子放水果)

題目: In a row of trees, the i-th tree produces fruit with type tree[i]. You start at any tree of your choice, then

原创 滑動窗口(一):Maximum of all subarrays of size k

描述: Given an array A and an integer K. Find the maximum for each and every contiguous subarray of size K. Input: T

原创 滑動窗口(四)——leetcode No.209. Minimum Size Subarray Sum

題目: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarr

原创 關於realsenseD400系列的FW固件dfu更新失敗的原因

可能的原因(按可能性從大到小排列): 1.進realsense的view界面時注意一下上面顯示的usb型號,如果是USB2.0肯定不能更新固件的,甚至你在設備管理器的camera(相機)部分只能看到一個realsenseD400 dept

原创 leetcode No.16 3Sum Closest(最接近的三數之和)

題幹: 效果: 思路: 這道題跟No.15很像,就是要找三數之和,但15是找三數之和爲0,這題是找離target最近的和。 首先我們得排序,因爲調用默認排序的時間複雜度是O(nlogn),而這道題暴力遍歷是O(n^3),想處理

原创 備戰面試——算法部分leetcode Sum3

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

原创 數組類(一):leetcode No.18. 4Sum 四數之和

題目什麼的都不貼了,來的人都看過題目,以後這個主要是寫給我自己覆盤總結,順便蹭點粉。 代碼: class Solution { public List<List<Integer>> fourSum(int[] nums,

原创 郵箱不可用 550 User has no permission(JavaMail登不進郵件系統)

當傳入發送郵箱正確的用戶名和密碼時,總是收到到:550 User has no permission這樣的錯誤, 其實我們用Java發送郵件時相當於自定義客戶端根據用戶名和密碼進行登錄,然後使用SMTP服務發送郵件。但新註冊的163郵件默

原创 劍指offer題目總結(一)

1.遞推/遞歸題 我們可以用2*1的小矩形橫着或者豎着去覆蓋更大的矩形。請問用n個2*1的小矩形無重疊地覆蓋一個2*n的大矩形,總共有多少種方法?   比如n=3時,2*3的矩形塊有3種覆蓋方法: 畫兩三個圖,就知道,其實是個斐波拉

原创 劍指offer(二)(來自牛客網)

1. 輸入一個整數,輸出該數二進制表示中1的個數。其中負數用補碼錶示。 public class Solution {     public int NumberOf1(int n) {         int t=0;        

原创 maven+tomcat+vscode實現JavaWeb開發(一)

由於電腦容量有限,最後還是拋棄了eclipse換成更輕便熟悉的vscode 配置先放這: maven:https://blog.csdn.net/weixin_43916850/article/details/87959273 tomca

原创 之前環境配得一團糟,如何跑通maskRCNN的demo?

這兩天有個項目要用到mask_RCNN,之前用win10配了一下午,愣是跑不了demo,主要是因爲寫pycocotools的作者壓根就沒考慮windows用戶,真是巨坑。 下面提供一種非常可靠的方案,不管你之前環境配成什麼沙雕樣子,現在你

原创 關於爲什麼使用oracle創建了新用戶爲什麼無法登入的原因

關於爲什麼使用oracle創建了新用戶爲什麼無法登入的原因: 1.創建用戶時要用c##開頭 2.創建完後要用system給新用戶分配至少connect權限 3.用conn登陸時,用戶名前要加c## 如整個過程如下: conn syste

原创 求解素因子

素因子的定義:對於一個數n來說,將它的因子拆到若干個素數相乘,這些素數被稱爲n的素因子。 比如 12可以被拆爲2 6 6不是質數,可以繼續拆爲2*3 所以最後12的素因子就是 2, 3(不計重複元素) ------------------