Skip to content

michaelgirg/LinearSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Linear Search Strings

Author: Amanpreet Kapoor
Difficulty: Easy

Problem Statement

Write a function that takes in two parameters:

  • container: a vector of strings
  • target: a single string

The function should check if the target exists in the container and return a boolean value indicating the result.

Sample Input

container: ["apple", "banana", "mango", "kiwi", "strawberry"]
target: "mango"

Sample Output

true

Explanation

The function checks if the target string "mango" is present in the container. Since it is, the output is true.

Constraints

  • container contains at least one string
  • target is a non-empty string
  • No strings include newlines or whitespace characters
  • Search is case-sensitive

License

This project is open source under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages