We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Write a C function to find the kth occurrence of an odd integer in a sequence of non-
negative integers.
Input
You are given the input in two lines:
The first line contains a positive integer k.
In the second line, you will be given a sequence of numbers terminated with a -1.
You have to find the kth occurrence of an odd integer in the sequence.
Note: The -1 is not part of the sequence.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Text Editor
You are viewing a single comment's thread. Return to all comments →
Write a C function to find the kth occurrence of an odd integer in a sequence of non- negative integers.
Input
You are given the input in two lines:
The first line contains a positive integer k.
In the second line, you will be given a sequence of numbers terminated with a -1. You have to find the kth occurrence of an odd integer in the sequence.
Note: The -1 is not part of the sequence.