Sainnhe Park
d7e65dd894
All checks were successful
continuous-integration/drone/push Build is passing
20 lines
444 B
C++
20 lines
444 B
C++
#include "s0239_sliding_window_maximum.hpp"
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(Problem239, Case1) {
|
|
vector<int> nums{1, 3, -1, -3, 5, 3, 6, 7};
|
|
int k{3};
|
|
vector<int> expected{3, 3, 5, 5, 6, 7};
|
|
S0239 solution;
|
|
EXPECT_EQ(solution.maxSlidingWindow(nums, k), expected);
|
|
}
|
|
|
|
TEST(Problem239, Case2) {
|
|
vector<int> nums{1};
|
|
int k{1};
|
|
vector<int> expected{1};
|
|
S0239 solution;
|
|
EXPECT_EQ(solution.maxSlidingWindow(nums, k), expected);
|
|
}
|