原创 《數據庫SQL實戰》從titles表獲取按照title進行分組,每組個數大於等於2,給出title以及對應的數目t。 注意對於重複的emp_no進行忽略。

題目描述 從titles表獲取按照title進行分組,每組個數大於等於2,給出title以及對應的數目t。 注意對於重複的emp_no進行忽略。 CREATE TABLE IF NOT EXISTS “titles” ( e

原创 《leetcode》single-number-ii

題目描述 Given an array of integers, every element appears three times except for one. Find that single one. Note: Y

原创 《leetcode》remove-duplicates-from-sorted-array-ii

題目描述 Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted

原创 springboot+IntelliJ IDEA實現熱部署

問題:在沒有使用springboot前,我們很方便的可以使用開發工具的熱部署功能,在此不贅述之前的方法了,而使用springboot集成開發後就可以繼續使用熱部署麼?答案是肯定的 解決方法:分三步走 第1步:在maven配置的po

原创 《數據庫SQL實戰》統計出當前各個title類型對應的員工當前薪水對應的平均工資。

題目描述 統計出當前各個title類型對應的員工當前薪水對應的平均工資。結果給出title以及平均工資avg。 CREATE TABLE salaries ( emp_no int(11) NOT NULL, salary

原创 《leetcode》valid-sudoku

題目描述 Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially

原创 《leetcode》first-missing-positive

題目描述 Given an unsorted integer array, find the first missing positive integer. For example, Given[1,2,0]return3,

原创 《挖財編程題》水花仙數

題目描述 春天是鮮花的季節,水仙花就是其中最迷人的代表,數學上有個水仙花數,他是這樣定義的: “水仙花數”是指一個三位數,它的各位數字的立方和等於其本身,比如:153=1^3+5^3+3^3。 現在要求輸出所有在m和n範圍內的水

原创 《數據庫SQL實戰》查找employees表

題目描述 查找employees表所有emp_no爲奇數,且last_name不爲Mary的員工信息,並按照hire_date逆序排列 CREATE TABLE employees ( emp_no int(11) NOT

原创 《數據庫SQL實戰》獲取當前(to_date='9999-01-01')薪水第二多的員工的emp_no以及其對應的薪水salary

題目描述 獲取當前(to_date=’9999-01-01’)薪水第二多的員工的emp_no以及其對應的薪水salary CREATE TABLE salaries ( emp_no int(11) NOT NULL, s

原创 《編程題》組裝三角形

題目:牛牛手裏有N根木棒,分別編號爲1~N,現在他從N根裏想取出三根木棒,使得三根木棒構成一個三角形,你能計算出牛牛有多少種取法嗎?(考慮兩種取法中使用的木棒編號有一個不一樣就認爲是不同的取法)。 輸入描述: 首先輸入一個正

原创 《挖財編程題》求數列的和

題目描述 數列的第一項爲n,以後各項爲前一項的平方根,求數列的前m項的和。 輸入描述: 輸入數據有多組,每組佔一行,由兩個整數n(n < 10000)和m(m < 1000)組成,n和m的含義如前所述。 輸出描述: 對於

原创 《leetcode》pascals-triangle(楊輝三角)

題目描述 Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Return [

原创 《數據庫SQL實戰》查找所有員工的last_name和first_name以及對應的dept_name

題目描述 查找所有員工的last_name和first_name以及對應的dept_name,也包括暫時沒有分配部門的員工 CREATE TABLE departments ( dept_no char(4) NOT NULL

原创 《leetcode》best-time-to-buy-and-sell-stock-i-ii-iii

題目描述1 Say you have an array for which the i th element is the price of a given stock on day i. Design an algorithm