LeetCode 20

2356.Number of Unique Subjects Taught by Each Teacher

*Problem Write a solution to calculate the number of unique subjects each teacher teaches in the university.Return the result table in any order. *ExplanationTeacher 1: - They teach subject 2 in departments 3 and 4. - They teach subject 3 in department 3.Teacher 2: - They teach subject 1 in department 1. - They teach subject 2 in department 1. - They teach subject 3 in department 1. - They..

1633. Percentage of Users Attended a Contest

* Problem Write a solution to find the percentage of the users registered in each contest rounded to two decimals.Return the result table ordered by percentage in descending order. In case of a tie, order it by contest_id in ascending order. Explanation: All the users registered in contests 208, 209, and 210. The percentage is 100% and we sort them in the answer table by contest_id in ascending ..

2624.Memoize

안녕하세요. Dev.D입니다.A memoized function is a function that will never be called twice with the same inputs. Instead it will return a cached value.Memoization은 사용하는 함수를 저장함으로써 과거의 이력을 기반으로 재사용 빠르게 작동할 수 있도록 한다. 2624.Memoize 문항은 JS 캐시에 남아있는 정보로 동일한 입력에 대해 함수를 처음부터 부르지 않는 memoized function에 대한 문제입니다. * Solution/**     * @param {Function} fn     * @return {Function} */ function memoize(fn) {     const c..