add: desc [cpp]

This commit is contained in:
Lam Haoyin 2022-03-25 19:35:53 +08:00
parent 8de2cc8b25
commit 4b19e7c2d4
No known key found for this signature in database
GPG Key ID: 8C089CB1A2B7544F
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,10 @@
#include <iostream> #include <iostream>
/**
* 172. Factorial Trailing Zeroes
* Given an integer n, return the number of trailing zeroes in n!.
*/
class Solution { class Solution {
public: public:
// This algorithm is far NOT optimal. // This algorithm is far NOT optimal.

View File

@ -2,6 +2,12 @@
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
/**
* 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 { class Solution {
public: public:
static int twoCitySchedCost(std::vector<std::vector<int>>& costs) { static int twoCitySchedCost(std::vector<std::vector<int>>& costs) {