add: desc [cpp]
This commit is contained in:
parent
8de2cc8b25
commit
4b19e7c2d4
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue