jtomassoni / coding-challenges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coding Challenges

Intro

  • Each challenge is essentially finding a way to transform the given input to the output desired.

Steps to Repeat

  1. understand the problem (you want to change the input to the output) nothing more nothing less
  2. break solution down into steps of pseudocode then ask how for each step
  3. test each line to make sure they are doing what you expect them to do

Tips

  • Pseudoode is the most important part.

  • The more methods you know the better.

  • Test each line as you go along and console log to make sure the code does what you want it to

  • When things don't work as expected look up the documentation

  • Limit time that you are stuck to only 15 minutes

  • It is helpful to look at the solution and reverse engineer it if you aren't able to solve it

  • Once you've looked at the solution try it again to see how much you've learned

  • Each problem can be taken to the next step by trying to understand the Big O of your solutions

What do tests do?

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

Important methods

Javascript

Terms and Explanations

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Strings
  1. .split('') * splits strings on whatever is passed into the parenthesis ```javascript const str = 'The quick brown fox jumps over the lazy dog.';
const words = str.split(' ');
console.log(words);
 Array ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog."]
```
Integers

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Arrays
  1. .sort() * sorts arrays by values inside * numbers need a helper function because they are sorted as strings
```javascript
let fruits = ["Banana", "Orange", "Apple", "Mango"];
// Apple, Banana, Mango, Orange

let points = [40, 100, 1, 5, 25, 10];
points.sort(function(a, b){return a - b});
// 1,5,10,25,40,100
```
Objects

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Higher Order Functions

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Common Errors

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

Python

Terms and Explanations

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Strings
  1. .split('') * splits strings on whatever is passed into the parenthesis ```python text= 'Love thy neighbor'
# splits at space
print(text.split())
['Love', 'thy', 'neighbor']
```
Integers and Floats

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Lists

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Dictionaries

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
Common Errors

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

Code Challenge Sites


Resources

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets

About