Company: IBM sde

Difficulty: medium

Problem Statement

You are given a string s made up of lowercase English letters. Some letters in the string may appear more than once. Find the first character that occurs exactly once in the string. If no such character exists, return -1. #include <bits/stdc++.h> /* * Complete the 'first_non_repeating' function below. * * The function is expected to return an INTEGER. * The function accepts STRING s as parameter. */ int first_non_repeating(string s) { } int main() ...

More IBM sde OA questionsInterview experiences