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

×

Explain it ?

According to definition of prefix on Wikipedia :" A proper prefix of a string is not equal to the string itself."

so how for "test case 1: <<>> " answer 4 is possible ? plz explain if i am going wrong.

asked 05 May '14, 16:44

cyberhex's gravatar image

2★cyberhex
101126
accept rate: 0%


Please ask these type of questions on comments page. :) . However the question wants you to output "maximum length" of string that is valid starting from index 0.

for example <<>> here whole string is valid so length is 4 <>>> here only starting 2 is valid so length is 2

Hope that clears your doubt.

PS: The questions talks about prefix not "proper prefix" . A prefix can be equal to the string itself.

link

answered 05 May '14, 16:51

c0d3_k1ra's gravatar image

2★c0d3_k1ra
175118
accept rate: 11%

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:

×690
×100

question asked: 05 May '14, 16:44

question was seen: 617 times

last updated: 05 May '14, 16:51