This commit is contained in:
17
tests/s0503_next_greater_element_ii.cpp
Normal file
17
tests/s0503_next_greater_element_ii.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "s0503_next_greater_element_ii.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(Problem503, Case1) {
|
||||
vector<int> nums{1, 2, 1};
|
||||
vector<int> expected{2, -1, 2};
|
||||
S0503 solution;
|
||||
EXPECT_EQ(solution.nextGreaterElements(nums), expected);
|
||||
}
|
||||
|
||||
TEST(Problem503, Case2) {
|
||||
vector<int> nums{1, 2, 3, 4, 3};
|
||||
vector<int> expected{2, 3, 4, -1, 4};
|
||||
S0503 solution;
|
||||
EXPECT_EQ(solution.nextGreaterElements(nums), expected);
|
||||
}
|
Reference in New Issue
Block a user