0% found this document useful (0 votes)
3 views1 page

1d Array

The document outlines a Smart Coding & Interview Series focused on basic programming challenges involving 1-D arrays. It presents four specific problems related to string manipulation, including finding unique and repeated characters, removing characters, and identifying the most frequent character. Participants are encouraged to apply learned strategies using their preferred programming language.

Uploaded by

info.pankajj87
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

1d Array

The document outlines a Smart Coding & Interview Series focused on basic programming challenges involving 1-D arrays. It presents four specific problems related to string manipulation, including finding unique and repeated characters, removing characters, and identifying the most frequent character. Participants are encouraged to apply learned strategies using their preferred programming language.

Uploaded by

info.pankajj87
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Smart Coding & Interview Series

Top-20 Basic Program


(1-D Array Applications)
First, understand the solution building strategies and coding for the problems in
LIVE/VIDEO session and then you apply those strategies discussed in
LIVE/VIDEO session to solve the following problems. Use your favourite
language(C/C++/Java/C#/Python/Scala) for coding.

1) First Unique Character in a String: Given a string, find the first non-repeating character
in it and return its index. If it doesn't exist, return -1. Assume that only lower case letters are
allowed as part of string.
Example:
S=”algorithmica’
Return 1
Source:[Link]

2) First Repeated Character in a String: Given a string, find the first repeating character in it
and return its index. If it doesn't exist, return -1. Assume that only lower case letters are
allowed as part of string.
Example:
S=”algorithmica’
Return: 0

3) Remove Characters in a String: Given a string, find an efficient algorithm that takes two
strings as arguments and removes the characters from first string which are present in
second string. Assume that only lower case letters are allowed as part of strings and relative
order of characters in first string must be preserved.
Example:
S1=”algorithmica’ S2=’aio’
Return: lgrthmc

4) Most Frequent Character in a String: Find an efficient algorithm that returns the most
frequent character in a given string. In case of tie, return any character. Assume that only
lower case letters are allowed as part of string.
Example:
S=”algorithmica’
Return: a or i

Copyright © Algorithmica
[Link]

You might also like