Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • $\begingroup$ How did you find the function? Or you have already knew it? $\endgroup$ Commented Sep 27, 2024 at 14:29
  • $\begingroup$ @azerbajdzan I came across it recently when I was working on a separate problem and I remembered it when I read this problem. $\endgroup$ Commented Sep 27, 2024 at 14:30
  • $\begingroup$ I think the function is for general case. i.e. any criterion can be chosen. So I guess for my specific criterion there might be a faster algorithm. $\endgroup$ Commented Sep 27, 2024 at 14:35
  • $\begingroup$ You are definitely right about that. That may be a little too challenging for me though :D $\endgroup$ Commented Sep 27, 2024 at 15:06