Initial Course
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
[[nodiscard]] auto filter_length(const std::vector<std::string>& words, std::size_t min_len)
|
||||
-> std::vector<std::string>;
|
||||
[[nodiscard]] auto map_to_lengths(const std::vector<std::string>& words) -> std::vector<int>;
|
||||
[[nodiscard]] auto first_match(const std::vector<int>& data, int threshold) -> int;
|
||||
|
||||
} // namespace stl_algorithms
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
[[nodiscard]] auto reverse_copy(const std::vector<int>& data) -> std::vector<int>;
|
||||
[[nodiscard]] auto countGreaterThan(const std::vector<int>& data, int threshold) -> int;
|
||||
[[nodiscard]] auto everyEven(const std::vector<int>& data) -> bool;
|
||||
|
||||
} // namespace stl_algorithms
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
[[nodiscard]] auto sorted_copy(std::vector<int> data) -> std::vector<int>;
|
||||
[[nodiscard]] auto contains(const std::vector<int>& data, int value) -> bool;
|
||||
[[nodiscard]] auto lower_bound_index(const std::vector<int>& sorted, int value) -> int;
|
||||
|
||||
} // namespace stl_algorithms
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace stl_algorithms {
|
||||
|
||||
[[nodiscard]] auto square_all(const std::vector<int>& data) -> std::vector<int>;
|
||||
[[nodiscard]] auto sum_all(const std::vector<int>& data) -> int;
|
||||
[[nodiscard]] auto product_positive(const std::vector<int>& data) -> long long;
|
||||
|
||||
} // namespace stl_algorithms
|
||||
Reference in New Issue
Block a user