LeetCode(3)
-
[30 Days of JS] Array reduce transformation / Function composition
/** * @param {number[]} nums * @param {Function} fn * @param {number} init * @return {number} */var reduce = function(nums, fn, init) { let value = init; if (!nums.length) { return init; } else { for (let i = 0; i nums array가 비어있는 경우 따로 처리해주기 -> 코드를 넣지 않아도 알아서 처리가 되지만, 혹시 몰라서 추가/** * @param {Function[]} functions * @return {Function} */var compose = function(functions) { ..
2025.05.10 -
[LeetCode/MySQL50] 1683. Invalid Tweets
ProblemSolution# Write your MySQL query statement belowSelect tweet_id from Tweets where length(content) > 15;
2025.01.13 -
[LeetCode/MySQL50] 1757. Recyclable and Low Fat Products
MySQL도 다시 복습할 겸 시작하는 LeetCode MySQL 50 문제 풀기 ProblemSolution# Write your MySQL query statement belowSELECT product_id FROM Products WHERE low_fats = "Y" and recyclable = "Y"; 매우 기본적인 Select 구문 연습 문제였다. 다른 독특한 코드가 있나 봤지만 딱히 없으므로 첫번째 문풀은 여기서 마무리 문제https://leetcode.com/studyplan/top-sql-50/
2025.01.11