CODING 3MIN: REMOVE SCREWS I
Channel:
Subscribers:
4,890
Published on ● Video Link: https://www.youtube.com/watch?v=9R0ZBqbCRQI
My task is to return the total time taken to remove all the screws, in seconds
EXPLANATION CODE:
1) The function sc calculates the sum based on the screws array. It initializes the sum variable to 1. Then, it iterates through the screws array starting from the second element. For each iteration, it compares the current screw with the previous screw. If they are equal, it adds 2 to the sum; otherwise, it adds 7. Finally, it returns the calculated sum.
Contents:
0:00 - Reading
1:40 - Solving
3:01 - Explaining
#codewars #code #wars #javascript #game #remove #screws #programming #education #tutorial #computerscience #mathematics #games #puzzles
Other Videos By One Person Studio
2023-05-22 | TENYA LIDA #shorts #art #drawing |
2023-05-22 | L #shorts #art #drawing |
2023-05-22 | AREA OF A TRIANGLE |
2023-05-22 | SUB ZERO #shorts #art #drawing |
2023-05-22 | NARUTO #shorts #art #drawing |
2023-05-22 | CONVERT MINUTES INTO SECONDS |
2023-05-22 | SKETCHBOOK TOUR PART CXXII #shorts #art #drawing |
2023-05-21 | GIRL XXIX #shorts #art #drawing |
2023-05-21 | MUSIC #shorts #art #drawing |
2023-05-21 | GIRL XXVIII #shorts #art #drawing |
2023-05-21 | CODING 3MIN: REMOVE SCREWS I |
2023-05-21 | FALL GUYS ASTRONAUT #shorts #art #drawing |
2023-05-21 | KAKASHI #shorts #art #drawing |
2023-05-21 | BOY XXXVIII #shorts #art #drawing |
2023-05-21 | PLAYING CARDS DRAW ORDER PART I |
2023-05-21 | SKETCHBOOK TOUR PART CXXI #shorts #art #drawing |
2023-05-20 | THE SPEAKING |
2023-05-20 | KAWAKI #shorts #art #drawing |
2023-05-20 | MINNIE MOUSE #shorts #art #drawing |
2023-05-20 | TOM #shorts #art #drawing |
2023-05-20 | FALL GUYS JOGGING #shorts #art #drawing |
Tags:
codewars
code
wars
tutorial
step by step
education
computer science
explanation
7kyu
algorithms
games
puzzles
javascript
javascript programming
coding 3min: remove screws
coding
3min
remove
screws