A mistake in Time complexity. Since the example for using k as 3, at that moment I said space is O(1). But actually space is variable for different test cases, depending on k. So space complexity is O(k)
yes, yesterday question was even difficult for me. But since I already had in my mind to work on YT but question's complexity was quite high, I thought of making the thumbnail better. ;)
A mistake in Time complexity. Since the example for using k as 3, at that moment I said space is O(1). But actually space is variable for different test cases, depending on k. So space complexity is O(k)
hmm thumbnail changed
yes, yesterday question was even difficult for me. But since I already had in my mind to work on YT but question's complexity was quite high, I thought of making the thumbnail better. ;)