0
$\begingroup$

Uppercase letters $(A - Z)$ and numbers $(0 - 9)$ are used to generate all possible combinations of strings of length $10$ characters such as $NAH562GTDS$. Assuming that all the possible combinations are generated and sorted in a text file such that the very first string is $0000000000$ and the last one $ZZZZZZZZZZ$, how can we determine the line number in which a string appears?

$\endgroup$
1
$\begingroup$

Hint. Think to the given string as number written in base $10+26$.

P.S. In this base what is the numerical value of the digits $Y$, $E$ and $S$? Then what is the position of the string $0000000YES$? Show your effort and edit your question with your attempt.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Apologies good sir, but could you please elaborate further with an example? $\endgroup$ – Kara Kirkland Jan 18 '19 at 8:50
  • $\begingroup$ In this base what is the numerical value of the digits $Y$, $E$ and $S$? Then what is the position of the string $0000000YES$? Show your effort and edit your question with your attempt. $\endgroup$ – Robert Z Jan 18 '19 at 9:02
  • $\begingroup$ I have no effort whatsoever. My mind is an enigma that just comes up with these ideas from nowhere. When that happens, I am completely at lost on what to do. This is one of those instances. $\endgroup$ – Kara Kirkland Jan 18 '19 at 9:13
  • $\begingroup$ This page could be useful: simple.wikipedia.org/wiki/Hexadecimal_numeral_system $\endgroup$ – Robert Z Jan 18 '19 at 9:15
  • $\begingroup$ Why hexadecimal? That doesn't look like what I'm looking for $\endgroup$ – Kara Kirkland Jan 18 '19 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.