79313950

Date: 2024-12-28 14:39:04
Score: 0.5
Natty:
Report link

how to approach this?

If all values are allowed to be the same, the k-smallest element can be anywhere: assuming values are unique.

In a max heap, a leaf contains the 1-smallest value, at index from N/arity upto N-1 or N depending on whether indexing starts at 0 or 1.
A leaf may contain any unique value up to the k = N - logarity(N)th smallest (N-kth largest): large values will be closer to the root or, for k = N coincide with it.

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): how to
  • High reputation (-1):
Posted by: greybeard