Weekly
-
weekly-contest-187릿코드(LEETCODE) 2020. 5. 5. 20:55
https://leetcode.com/contest/weekly-contest-187/ 1번 문제 - 1436. Destination City https://leetcode.com/contest/weekly-contest-187/problems/destination-city/ 문자열 배열 [["B","C"],["D","B"],["C","A"]] 일때 D->B->C->A 로 경로를 나타낼 수 있다. 마지막 최종 경로인 A 를 출력 하는 문제이다. 시작점과 끝점은 1 번만 나오게 된다. class Solution { public: // 마지막은 항상 뒤에 있음으로 string destCity(vector & paths) { map m; for (int i = 0; i < paths.size(); i++) {..