problemscpp
A collection of my answers to algorithm problems in c++.
| 函数
leetcode::count_good_triplets_in_an_array 命名空间参考

LeetCode 5999. 统计数组中好三元组数目 更多...

class  FenwickTree
 
class  Solution
 

函数

 TEST (count_good_triplets_in_an_array, case1)
 
 TEST (count_good_triplets_in_an_array, case2)
 

详细描述

LeetCode 5999. 统计数组中好三元组数目

函数说明

◆ TEST() [1/2]

leetcode::count_good_triplets_in_an_array::TEST ( count_good_triplets_in_an_array  ,
case1   
)

在文件 leetcode_test.cpp1634 行定义.

1634 {
1635 vector input1 = {2, 0, 1, 3};
1636 vector input2 = {0, 1, 2, 3};
1637 ASSERT_EQ(1, Solution::goodTriplets(input1, input2));
1638 }

引用了 leetcode::count_good_triplets_in_an_array::Solution::goodTriplets().

◆ TEST() [2/2]

leetcode::count_good_triplets_in_an_array::TEST ( count_good_triplets_in_an_array  ,
case2   
)

在文件 leetcode_test.cpp1640 行定义.

1640 {
1641 vector input1 = {4, 0, 1, 3, 2};
1642 vector input2 = {4, 1, 0, 2, 3};
1643 ASSERT_EQ(4, Solution::goodTriplets(input1, input2));
1644 }

引用了 leetcode::count_good_triplets_in_an_array::Solution::goodTriplets().