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

  1. Kth Largest Element in an Array
更多...

class  Solution
 

函数

 TEST (kth_largest_element_in_an_array, case1)
 
 TEST (kth_largest_element_in_an_array, case2)
 

详细描述

  1. Kth Largest Element in an Array

函数说明

◆ TEST() [1/2]

leetcode::kth_largest_element_in_an_array::TEST ( kth_largest_element_in_an_array  ,
case1   
)

在文件 leetcode_test.cpp3245 行定义.

3245 {
3246 vector nums = {3, 2, 1, 5, 6, 4};
3247 ASSERT_EQ(5, Solution::findKthLargest(nums, 2));
3248 }

引用了 leetcode::kth_largest_element_in_an_array::Solution::findKthLargest().

◆ TEST() [2/2]

leetcode::kth_largest_element_in_an_array::TEST ( kth_largest_element_in_an_array  ,
case2   
)

在文件 leetcode_test.cpp3250 行定义.

3250 {
3251 vector nums = {3, 2, 3, 1, 2, 4, 5, 5, 6};
3252 ASSERT_EQ(4, Solution::findKthLargest(nums, 4));
3253 }

引用了 leetcode::kth_largest_element_in_an_array::Solution::findKthLargest().