How do I work on this?

Правка en1, от mayukh03, 2023-04-03 16:43:56

I have trouble finding the indexes or lengths of subsegments of arrays/strings.

For eg. If I want to extract the last k characters of a string s of length n(n>=k), the most normal way to do it is s.substr(n-k,k). But it takes me a few more seconds than it normally should, as I get confused whether the 'n-k' actually takes me to kth character from the end or a character before/after it.

Why do I face this issue and how do I get rid of it?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский mayukh03 2023-04-03 16:43:56 472 Initial revision (published)