Description
There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb.
On the third round, you toggle every third bulb (turning on if it’s off or turning off if it’s on). For the ith round, you toggl…
392. 判断子序列 - 力扣(LeetCode) 给定字符串 s 和 t ,判断 s 是否为 t 的子序列。字符串的一个子序列是原始字符串删除一些(也可以不删除)字符而不改变剩余字符相对位置形成的新字符串。(例如,…
行转列
使用CASE函数聚合函数 SELECTMAX(CASE WHEN salesperson John THEN sales_amount END) AS John_Sales,MAX(CASE WHEN salesperson Alice THEN sales_amount END) AS Alice_Sales
FROM sales_data;列转行
使用UNIO连接每列数据
SELECT product_id,store1 store,sto…