일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- 백준
- self driving car
- GNN
- PathPlanning
- 소프티어
- 정적라이브러리
- solver
- CPP
- C
- CUDA
- 경로생성
- GIT
- Motion Planning
- 선형대수
- Leetcode
- Hybrid A star
- Recursion
- Graph Neural Network
- C++
- 공유라이브러리
- 수치최적화
- 강화학습
- DynamicProgramming
- Frenet Coordinate
- 동적라이브러리
- Dubins Path
- MDP
- path planning
- autonomous vehicle
- OSQP
- Today
- Total
목록전체 글 (128)
Swimmer
Solution - Use qsort(2D array, 2 column) & Greedy Algorithms - Time Limit Exceed int minGroups(int** intervals, int intervalsSize, int* intervalsColsize) { int i = 0; int** RefArr; int RefArrSize = intervalsSize; int** TmpArr; int TmpArrSize = intervalsSize; int NumOfGroup = 0; int StartIndex = 0; int EndIndex = 0; // Sort qsort(intervals, intervalsSize, sizeof(intervals[0]), compare2Darray2Colu..
This contents is referenced from here : (https://en.cppreference.com/w/c/algorithm/qsort) There is default qsort() function in c and cpp basic library. If you don't have good function for sorting, qsort is great alternatives. qsort - Sorts elements of given array point in ascending order void qsort(void *ptr, size_t count, size_t size, int (*comp)(const void *, const void *) ); parameters ptr - ..
Solution - Simple Count of Max Depth Time Complexity O(n) Space Complexity O(n) int maxDpeth(char* s); int main() { char string[] = "(1)+((2))+(((3)))"; int RetVal; RetVal = maxDpeth(string); return 0; } int maxDpeth(char* s) { int Depth = 0; int MaxDepth = 0; int NumOfChar = 0; while (s[NumOfChar] != '\0') { if (s[NumOfChar] == '(') { ++Depth; } else if (s[NumOfChar] == ')') { --Depth; } else {..
Solution - Use Hash Table Time Complexity O(n) Space Complexity O(n) #include bool digitCount(char* pnum); int main() { char string[] = "030"; bool RetVal; RetVal = digitCount(string); return 0; } bool digitCount(char* pnum) { bool bRetVal = true; const int ASCIINumberInit = 48; int i = 0; int NumOfChar = 0; int arrHashTable[10] = { 0 }; while (pnum[NumOfChar] != '\0') { arrHashTable[pnum[NumOfC..