#Problem #0
Reverse string
Solution (JS) https://github.com/anique12/Coding-problems/blob/master/strings/reverse-string.js
#Problem #1
#Problem #0
Reverse string
Solution (JS) https://github.com/anique12/Coding-problems/blob/master/strings/reverse-string.js
#Problem #1
Make sure when looping, always start from 0 and always keep the condition of your loop less than the length of array for example: for(int i= 0; i< str.Lenght; i++){ } as we know that the arrays start at index 0, and the string array size is always greater than the last index of the element
Take care of case insensitivity, read problems carefully and decide on the case insensitivity accordingly
Always plan your solution according to the allowed characters, else you might end up replacing a character with a character leaving a bug
Some considerations while starting with problem solving till 100+ Leetcode problems are solved: | |
- Start with the most-easiest problems. | |
- DO NOT try to solve each problem yourself, instead try to learn and understand how different problems are being solved | |
- Do not try to solve a problem for more than 1 hour initially to get fast and to achieve more in less time, for any problem taking more than 1 hour, put it in a backlog and solve it later | |
- Average time to solve a problem should be 3-45 minutes | |
- Do not try to solve a lot of problems from one topic, instead try to solve 5-10 problems per topic | |
- Do not try to jump into problem solving directly wihtout the necessary pre-requisites, For example | |
> If you are trying to solve a problem that requires HashSet/HashMap then make sure you have studied HashMap before solving the problem | |
> If you are trying to solve a problem that uses recursion, first make sure you learn recursion properly |