Initial Course
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "algorithm_lambdas.hpp"
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
auto filter_length(const std::vector<std::string>& words, std::size_t min_len)
|
||||
-> std::vector<std::string> {
|
||||
(void)words; (void)min_len;
|
||||
return {};
|
||||
}
|
||||
|
||||
auto map_to_lengths(const std::vector<std::string>& words) -> std::vector<int> {
|
||||
(void)words;
|
||||
return {};
|
||||
}
|
||||
|
||||
auto first_match(const std::vector<int>& data, int threshold) -> int {
|
||||
(void)data; (void)threshold;
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // namespace stl_algorithms
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "iterators.hpp"
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
auto reverse_copy(const std::vector<int>& data) -> std::vector<int> { (void)data; return {}; }
|
||||
auto countGreaterThan(const std::vector<int>& data, int threshold) -> int { (void)data; (void)threshold; return 0; }
|
||||
auto everyEven(const std::vector<int>& data) -> bool { (void)data; return false; }
|
||||
|
||||
} // namespace stl_algorithms
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "sort_and_find.hpp"
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
auto sorted_copy(std::vector<int> data) -> std::vector<int> { (void)data; return {}; }
|
||||
auto contains(const std::vector<int>& data, int value) -> bool { (void)data; (void)value; return false; }
|
||||
auto lower_bound_index(const std::vector<int>& sorted, int value) -> int { (void)sorted; (void)value; return -1; }
|
||||
|
||||
} // namespace stl_algorithms
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "transform_reduce.hpp"
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
auto square_all(const std::vector<int>& data) -> std::vector<int> { (void)data; return {}; }
|
||||
auto sum_all(const std::vector<int>& data) -> int { (void)data; return 0; }
|
||||
auto product_positive(const std::vector<int>& data) -> long long { (void)data; return 0; }
|
||||
|
||||
} // namespace stl_algorithms
|
||||
Reference in New Issue
Block a user