解題程式碼
Two pointers(此解法更簡單好懂)
var findClosestElements = function (arr, k, x) {...
⸜(ˊᗜˋ)⸝嗨,我是wec,今天是DAY 20。
🔎 題目難度與描述
難度:MEDIUM
題目描述:
給定一個整數數組 prices,其中 prices[i]...
Given an integer array nums sorted in non-decreasing order, remove the duplicat...
在演算法的世界裡,解題不僅僅是為了得到結果,更是如何在高效且優雅的方式中解決問題。今天我們要探討的是經典的 Leetcode 題目——三數之和。這道題考驗我們...
Given an integer array nums and an integer k, return the kth largest element in...
今天來解YKL09(UVA10931):Parity
Parity
這題是dec轉成binary計算binary總共有幾個1
用mod去解
#include...