LeetCode

Programming/LeetCode

[Dart] 1207. Unique Number of Occurrences

1. 문제https://leetcode.com/problems/unique-number-of-occurrences/description/?envType=study-plan-v2&envId=leetcode-75 2. 요구사항1) 정수 배열 arr가 주어진다.2) 배열 arr의 각 원소가 나타나는 빈도 수가 고유한지 확인한다.3) 각 원소의 빈도가 모두 다르면 true를 반환하고, 그렇지 않으면 false를 반환한다. 3. 코드class Solution { bool uniqueOccurrences(List arr) { // 빈 이중 리스트를 만듭니다. // list[0]: 등장한 숫자들 // list[1]: 각 숫자들의 등장 횟수 List> list = [[], []]; ..

TIL

[TIL] 250428 LeetCode 문제풀이, 팀 프로젝트 걸음 수 측정

1. LeetCode 문제풀이https://sfida.tistory.com/137 1137. N-th Tribonacci Number1. 문제https://leetcode.com/problems/n-th-tribonacci-number/description/?envType=study-plan-v2&envId=leetcode-75 2. 요구사항1) n번째 Tribonacci 수를 구한다.2) Tribonacci 수열은 초기값이 0, 1, 1로 시작하며, Tn = T(n - 1) + T(n - 2)sfida.tistory.com 2. 팀 프로젝트- pedometer 패키지를 활용하여 걸음 수 측정- 걸음수를 기반으로 이동 거리, 평균 속도, 칼로리 측정- 사용자의 러닝 기록을 Firestore에 저장- R..

Algorithm

1137. N-th Tribonacci Number

1. 문제https://leetcode.com/problems/n-th-tribonacci-number/description/?envType=study-plan-v2&envId=leetcode-75 2. 요구사항1) n번째 Tribonacci 수를 구한다.2) Tribonacci 수열은 초기값이 0, 1, 1로 시작하며, Tn = T(n - 1) + T(n - 2) + T(n - 3)으로 정의된다. 3. 코드class Solution { int tribonacci(int n) { if (n == 0) return 0; else if (n == 1) return 1; else if (n == 2) return 1; // 초기값 설정 int t0 = 0, t1 = 1, t2 = ..

TIL

[TIL] 250425 LeetCode 문제풀이, 코드리뷰, Firestore 데이터베이스 구조 설정

1. LeetCode 문제풀이https://sfida.tistory.com/135 [Dart] 1071. Greatest Common Divisor of Strings1. 문제https://leetcode.com/problems/greatest-common-divisor-of-strings/description/?envType=study-plan-v2&envId=leetcode-75 2. 요구사항1) 두 문자열 str1과 str2가 주어졌을 때 가장 큰 공약수를 찾아야 한다.2) 두 문자열의 공sfida.tistory.com 2. 팀 프로젝트 코드리뷰https://github.com/Meezzi/with-run-app/pull/40 https://github.com/Meezzi/with-run-app..

Meezzi
'LeetCode' 태그의 글 목록 (4 Page)