rue if the vector represents a min-heap, return false otherwise. 6. Given a C++ vector, return true if the vector represents a min-heap, Examples: • {1,3,5, 4, 6 } is a min-heap. • {1,5, 3, 4, 6 } is NOT a min-heap. • {2,4} is a min-heap • {10,5, 20 } is NOT a min-heap bool is_min heap (const vector int>& v) { Show transcribed image text rue if the vector represents a min-heap, return false otherwise. 6. Given a C++ vector, return true if the vector represents a min-heap, Examples: • {1,3,5, 4, 6 } is a min-heap. • {1,5, 3, 4, 6 } is NOT a min-heap. • {2,4} is a min-heap • {10,5, 20 } is NOT a min-heap bool is_min heap (const vector int>& v) {
Expert Answer
Answer to rue if the vector represents a min-heap, return false otherwise. 6. Given a C++ vector, return true if the vector repres…