Python solves Leetcode 1232 Check If It Is a Straight Line in seconds
Simple mathematics, especially high school mathematics, is a very good material for programming and practice. Don’t underestimate this slope formula. Many people are stuck with the denominator being 0!!
DFS C++解Leetcode 1376 Time Needed to Inform All Employees
一家公司的每個員工都有一個獨特的ID,從0到n-1。負責人是headID的那位, manager[headID] = -1。manager[i]表示員工i的直接經理,員工i需要花費informTime[i]分鐘來通知他的直接下屬,通知所有員工所需的時間?