Both of the algorithm sections require a whole other skill set of problem solving. It is ok to feel frustrated with these problems because you are brand new to this type of skill set and it takes time and practice. Eventually you will develop a process for problem solving and it will become easier. It did for me.
Here is my process for solving coding challenges.
- Step away from the computer and get some pen and paper. (This is an important step and should not be skipped)
- Paraphrase the problem in your own words to make sure that you understand it. (If the wording of the question is confusing then look at the FCC test cases and try to see if there is a pattern)
- Solve the problem away from the computer.
Forget about code for a second and ask yourself
How would I reverse a word?
Well you would naturally look at the last character of the original word and put that character in the beginning of a new reversed word right? Then you would repeat the process working from the end of the original word to the beginning and adding it one character at a time to the new word. Then you would stop when you have run out of characters.
4.Make sure to write out step by step how you solved the problem
This is important because you will use these steps to help you turn it into code.
Now that you have solved the problem away from a computer, then you can move back to your computer.
Go through each step of what you wrote out and look to mdn docs to help you along the way.
When I went through both algorithm sections, I relied heavily on mdn docs to look up array methods, string methods, as well as other things. Use that to your advantage.
Hope that helps!