原创 算法第二週作業05

Description 輸入一個整數,輸出該數二進制表示中1的個數。其中負數用補碼錶示。 Solutions 對於負數,通過其反碼中0的個數間接求取 對於正數,通過左向平移並判斷最低位是0是1來計數 太簡單,直接看代碼

原创 算法第三週作業01

題目描述 撲克牌遊戲大家應該都比較熟悉了,一副牌由54張組成,含3~A,2各4張,小王1張,大王1張。牌面從小到大用如下字符和字符串表示(其中,小寫joker表示小王,大寫JOKER表示大王):)  3 4 5 6 7 8 9 10

原创 算法第七週作業01

Description Validate if a given string is numeric. Some examples: “0” => true ” 0.1 ” => true “abc” => false “

原创 算法第四周作業02

Description Given an array S of n integers, find three integers in S such that the sum is closest to a given number,

原创 算法第二週作業06

Description 題目描述 老師想知道從某某同學當中,分數最高的是多少,現在請你編程模擬老師的詢問。當然,老師有時候需要更新某位同學的成績. 輸入描述: 輸入包括多組測試數據。 每組輸入第一行是兩個正整數N和M(0 < N

原创 算法第十八週作業01

Description Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the

原创 算法期末作業01

Desription 8.3: STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an int

原创 MySQl只能本地登錄,無法遠程登錄

環境: Ubuntu Mysql 5.7.20 判斷Mysql的端口狀態 netstat -apn |grep 3306 如果輸出結果包括tcp 0 0 127.0.0.1:3306 0.0.

原创 算法第十五週作業01

Description Given an array of integers, find if the array contains any duplicates. Your function should return true if

原创 算法第十六週作業01

Description Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its

原创 windows下mysql壓縮zip版本安裝

1. 官網下載mysql的zip版本 官網鏈接https://www.mysql.com/ 2. 解壓並配置 將壓縮包mysql-5.7.18-winx64.zip解壓到F:/ 在F:/mysql-5.7.18-winx64/下新建配置

原创 算法第十三週作業01

Description There are N children standing in a line. Each child is assigned a rating value. You are giving candies to t

原创 ubuntu16.04設置命令行啓動

1. 修改配置文件 sudo vim /etc/default/grub GRUB_CMDLINE_LINUX="" 改爲GRUB_CMDLINE_LINUX="text" 去掉註釋#GRUB_TERMINAL=console,即 G

原创 算法第十七週作業01

Description Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Solution

原创 maven項目單元測試時ClassNotFoundException問題

項目出現ClassNotFoundException的原因有幾種: 1. 未引入相關jar包 解決:查詢缺失的jar包,然後在pom.xml中導入相應jar包 2. jar包有問題 解決:從本地倉庫中刪除該損壞的jar包,更新ma