Skip to content

ahmad-511/one_question_interview

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"The One Question Interview"

Check out Dave Gray's YouTube Channel with all of my tutorials.

Description:

I Have Only One Javascript Question... It is hard to imagine, but a Reddit post reported a job interview with only one Javascript question. In this Javascript tutorial, we'll answer that question and break down the logic behind the answer.

YouTube Tutorial for this repository.

I suggest completing Dave Gray's 8 hour JavaScript course tutorial video if you are new to Javascript.

My Modifications:

  1. Use (n, k) variable to match ones from Wikipedia
  2. Start with none empty array const stackArray = [ [1] ];
  3. Remove the if statement to set first/last cell value, we would rather calculate their values (the Nullish coalescing operator comes in handy here)
  4. Collapse the borders of consecutive squares
  5. Adding odd class on squares with odd values to make the pascal's triangle pattern standout a little bit.

Academic Honesty

DO NOT COPY FOR AN ASSIGNMENT - Avoid plagiargism and adhere to the spirit of this Academic Honesty Policy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.6%
  • CSS 21.6%
  • HTML 17.8%