You are not logged in. Please login at www.codechef.com to post your questions!

×

Same string.

Can any coder can tell me how to check the string that it contain another string without using loop?
Thank's!

asked 07 Nov '16, 21:53

codemath's gravatar image

2★codemath
956
accept rate: 0%

wikified 07 Nov '16, 22:37


Please in during any important contest do not question or ..... ? hey ADMIN please close this POST !

link

answered 07 Nov '16, 22:19

marathon2017's gravatar image

2★marathon2017
31
accept rate: 0%

Hey! can't i clear my concepts?

(08 Nov '16, 15:54) codemath2★

Z algorithm :) why you do not search in google .... give you many algorithm .... geeksforgeeks is good for you .

link

answered 07 Nov '16, 22:17

marathon2017's gravatar image

2★marathon2017
31
accept rate: 0%

There are many methods to check whether a string is present within another string, few of them include

1) find method in C++ (naive algorithm) 2) KMP algorithm you can find in geeksforgeek or e-maxx.ru 3) Z Algorithm

link

answered 07 Nov '16, 22:22

neilit1992's gravatar image

3★neilit1992
1.1k13
accept rate: 20%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,901
×630
×16

question asked: 07 Nov '16, 21:53

question was seen: 650 times

last updated: 08 Nov '16, 15:54