Kata DSAs

I've started working on DSA's and it isn't for the feeble. It'll crush any ideas that you might have thought you knew what you were doing! Having said that, with pain in my heart, I'm glad I'm here for it. It's humbling me, putting me in my place and teaching me a whole heck of a lot!

Looping through a problem to act upon each element seems simple enough, unless of course, you are missing one key item. The addition of the empty string! I've started working in CodeWars, which was suggested to me by a mentor. They call their coding problems katas. Kata has several different meanings in Japanese, in this instance, it means the following. A very particular way of performing or doing something. I'm following a preparation acronym to help me methodically comb through the problem and break it down into smaller bites.

/*
(P)arameters: anything that needs to be included as a param
(R)eturn: what return should I be looking for to solve the problem
(E)xample: any examples that should be included
(P)seudocode: breakdown of each step to solve the entire problem
 - step 1
 - step 2 etc...
*/

function example(param1, param2) {
// write code below
}

Having this set to memory and placing it into your IDE before you even start the problem, helps me alleviate stress and anxiety. It's like a mental roadmap for my brain so I'm less prone to scattering my thoughts into too many places. I encourage you to feel free to grab this cheat sheet and use it every time you practice a DSA, besides practice makes perfect and we want to become rather great at problem-solving. If you're looking for a place to practice follow this link and sign up, see you there fellow warriors! CodeWars