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

×

AUSAG-Editorial

PROBLEM LINK:

Contest

Author: shakil ahmed

DIFFICULTY:

MEDIUM

PREREQUISITES:

String KMP

PROBLEM:

Given a sentence “S” and a word “s”. Need to find how many times word “s” occurs as a substring of “S”.

QUICK EXPLANATION:

This is straight forward KMP problem . One tricky thing is that one has to remove spaces from first string first . One can learn KMP from this video.

AUTHOR'S SOLUTIONS:

Author's solution can be found here.

This question is marked "community wiki".

asked 25 Mar '16, 19:26

math10's gravatar image

5★math10
34
accept rate: 0%

edited 29 Mar '16, 15:52

admin's gravatar image

0★admin ♦♦
19.8k350498541

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:

×15,852
×643
×75
×27
×3

question asked: 25 Mar '16, 19:26

question was seen: 665 times

last updated: 29 Mar '16, 15:52