• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
December 28, 2023 |650 Views
SDE Sheet - Minimum indexed character
  Share  2 Likes
Description
Discussion

This is a part of String section under GFG SDE Sheet. 

In this video, we are given, a string str and another string patt. Find the minimum index of the character in str that is also present in patt.

Example :

Input:
str = geeksforgeeks
patt = set
Output: 1

Explanation: e is the character which is present in given str "geeksforgeeks" and is also present in patt "set". Minimum index of e is 1. 

Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!

Do check out:-
Article: https://www.geeksforgeeks.org/find-character-first-string-present-minimum-index-second-string/
Problem: https://www.geeksforgeeks.org/problems/minimum-indexed-character-1587115620/1
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More