项目作者: freecodecamp-fresnoca

项目描述 :
Practice interview questions
高级语言: JavaScript
项目地址: git://github.com/freecodecamp-fresnoca/codecamp-interview-questions.git


Practice Interview questions

Goals:

  • Introduce everyone to common interview questions.
  • Pull requests to this repo with your solution.
  • Have fun!

1. Square Sum

Complete the squareSum method so that it squares each number passed into it and then sums the results together.

Ex:

  1. > squareSum([1, 2, 2]);
  2. = 9

From: http://www.codewars.com/kata/square-n-sum

2. High/Low

Given a string of space separated numbers, return the highest and lowest number as a string in form:

"High Low"

Ex:

  1. > HighLow("1 2 3 4 5");
  2. = "5 1"
  3. > HighLow("1 2 9 4 -3");
  4. = "9 -3"
  5. > HighLow("8 2 2 4 -1");
  6. = "8 -1"

3. Common technical questions

  1. How would you verify a prime number?
    Ex:
    1. > isPrime(137);
    2. = true
    3. > isPrime(237);
    4. = false
  2. How do get nth Fibonacci number? What is the run time complexity? Hint: create an array and iterate.
  3. How would you remove duplicate members from an array?

4. Soft skills interview questions

  • What did you learn yesterday/this week?
  • What excites or interests you about coding?
  • What is a recent technical challenge you experienced and how did you solve it?
  • Talk about your preferred development environment.
  • What are some advantages/disadvantages to testing your code?
  • What are some of your strengths? What are some of your weaknesses?