diff --git a/ipo/index.ixx b/ipo/index.ixx index ba896f59..737b5819 100644 --- a/ipo/index.ixx +++ b/ipo/index.ixx @@ -10,9 +10,10 @@ using std::priority_queue; using std::vector; namespace leetcode_test::ipo { export class Solution { - public: - int findMaximizedCapital(int k, int w, vector &profits, - vector &capital) { +public: + int findMaximizedCapital(int k, int w, vector& profits, + vector& capital) + { int n = profits.size(); int curr = 0; priority_queue, less> pq; diff --git a/print-in-order/index.ixx b/print-in-order/index.ixx index 68551ee8..c67ba6e6 100644 --- a/print-in-order/index.ixx +++ b/print-in-order/index.ixx @@ -7,21 +7,23 @@ using std::future; export module leetcode_test.print_in_order.Foo; namespace leetcode_test::print_in_order { export class Foo { - private: +private: std::promise outpromise2; std::promise outpromise3; - public: - Foo() {} +public: + Foo() { } - void first(function printFirst) { + void first(function printFirst) + { // printFirst() outputs "first". Do not change or remove this line. printFirst(); outpromise2.set_value(); } - void second(function printSecond) { + void second(function printSecond) + { future fu = outpromise2.get_future(); fu.get(); // printSecond() outputs "second". Do not change or remove this line. @@ -29,7 +31,8 @@ export class Foo { outpromise3.set_value(); } - void third(function printThird) { + void third(function printThird) + { future fu = outpromise3.get_future(); fu.get(); // printThird() outputs "third". Do not change or remove this line.