Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

0 votes

How to count this operation for (int interval = n/2; interval > 0; interval /= 2) using counting primitive operation?

You are looking at shell sort. Shell sort operation count is very, very hard to analyse. There is a very simple outer loop which is iterated log n times, but that is of very little use. There is a ...
gnasher729's user avatar
  • 30.4k
3 votes

How many lower-case 6 letter words can I write so that every pair has exactly two matching letters?

Such a construction is called an equidistant code in coding theory. Define $B_q(n,d)$ as the maximum number $N$ of codewords $c_1, \dots, c_N \in \{0,\dots,q-1\}^n$ with every pair having the equal ...
pcpthm's user avatar
  • 2,418

Top 50 recent answers are included