K-th Smallest in Lexicographical Order

preview_player
Показать описание
This video explains finding the kth smallest number in lexicographic order by using the most optimal approach of skipping maximum possible numbers.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
---------------------------------------------------------------------------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

useful video! i'm curious - what tool do you use to draw?

Автор

Could you clarify your statement at 1:14 regarding the requirement that the number of operations should be less than pow(10, 8) for the code to run within 1 second? What calculations led to that conclusion?

yougetwhatyouwishfor
Автор

for 1 you are already subtracting from k at start
and when u r calling countSteps() in first run of loop it will also do 2-1
so it doesn't it will count 2 from number 1?

rajshah