Find index of an element in a Set in C++
Given a set S consisting of N integers and an element K, the task is to find the index of the element K in the set S. If the element is not present in S, print -1. Examples: Input: N = 5, S = {1, 2, 3, 4, 6} K = 6Output: 5Explanation: 6 is the 5th element in S. Input: N = 5, S = {1, 2, 3, 4, 6}, K =