13.9 Find longest subarray with distinct entries

#1

13.9 seems identical to 13.7 variant 5, except that 13.9 asks for the length of the subarray, not the subarray itself. Is this correct, or am I missing something?

0 Likes

#2

Hi @lgtout,

Sorry that I have no idea which version you have so I have no idea that variant you refer. Would you mind to post the content of that variant?

0 Likes

#3

@tsunghsienlee: Sorry about that. This is in EPI in Java version 1.6.1.
13.9 is "Find the longest subarray with distinct enties"
13.7 is “Find the smallest subarray covering all values”. Variant 5 is “Given an array A, find the longest subarray A[i : j] such that all elements in A[i : j] are distinct”

0 Likes

#4

Hi @lgtout,

Thanks for this information, and we remove this variant recently.

0 Likes

#5

@tsunghsienlee I didn’t realize that EPI in Java v 1.6.1 is not the most recent version. I thought it was when I bought it from Amazon. Is the most recent one in print or only digital?

0 Likes

#6

Bought from Amazon is the latest version at the time you bought. Digital version is not recommended as our readers thought it is not easily to read due to Google Play rendering issue on some platforms.

0 Likes

#7

Good to know. Thanks!

0 Likes