From 4b19e7c2d4d903b5973b08db06ee4b0fde2bd3e7 Mon Sep 17 00:00:00 2001 From: Lam Haoyin Date: Fri, 25 Mar 2022 19:35:53 +0800 Subject: [PATCH] add: desc [cpp] --- cpp/2203/220325-CN.cpp | 5 +++++ cpp/2203/220325.cpp | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/cpp/2203/220325-CN.cpp b/cpp/2203/220325-CN.cpp index 4d23258..0b97d38 100644 --- a/cpp/2203/220325-CN.cpp +++ b/cpp/2203/220325-CN.cpp @@ -1,5 +1,10 @@ #include +/** + * 172. Factorial Trailing Zeroes + * Given an integer n, return the number of trailing zeroes in n!. + */ + class Solution { public: // This algorithm is far NOT optimal. diff --git a/cpp/2203/220325.cpp b/cpp/2203/220325.cpp index 76eceaa..80dcfbb 100644 --- a/cpp/2203/220325.cpp +++ b/cpp/2203/220325.cpp @@ -2,6 +2,12 @@ #include #include +/** + * 1029. Two City Scheduling + * A company is planning to interview 2n people. Given the array costs where costs[i] = [aCosti, bCosti], the cost of flying the ith person to city a is aCosti, and the cost of flying the ith person to city b is bCosti. + * Return the minimum cost to fly every person to a city such that exactly n people arrive in each city. + */ + class Solution { public: static int twoCitySchedCost(std::vector>& costs) {