You are not logged in. Please login at 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

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.


answered 05 May '14, 16:51

c0d3_k1ra's gravatar image

accept rate: 11%

toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 05 May '14, 16:44

question was seen: 617 times

last updated: 05 May '14, 16:51