Awesome post! Using an Object is a great way to ensure it runs in O(n) time.
Also, a tip I learned for making code blocks a lot easier to read is to take advantage of syntax highlighting; i.e. instead of using just the three backticks, put the language after it. It's hard to show in markdown, but something like this: ```javascript.
That should give something like this:
consttwoSum=(array,goal)=>{// ...}
Thanks so much for sharing! Your code is super readable and your explanations are very understandable.
My name is Adrian; currently a recent graduate of the Flatiron Software Engineering program. Broadening my knowledge base through posting and reading alike.
Awesome post! Using an
Object
is a great way to ensure it runs inO(n)
time.Also, a tip I learned for making code blocks a lot easier to read is to take advantage of syntax highlighting; i.e. instead of using just the three backticks, put the language after it. It's hard to show in markdown, but something like this:
`
`
`javascript
.That should give something like this:
Thanks so much for sharing! Your code is super readable and your explanations are very understandable.
Oh that's amazing I will definitely be using that thank you!