
Join the 100 algorithms challenge to boost your JavaScript and TypeScript skills, master higher-order functions, build a 100-algorithm portfolio, and prepare for technical interviews through daily practice.
Explore solving 100 algorithm challenges with examples, hints, and solution comparisons, using a GitHub repo of readme files and tests, and a brief TypeScript primer.
Learn to configure your tools for the course using Visual Studio Code as the main editor, with the optional Quokka extension to print console logs in JavaScript or TypeScript.
Explore a brief introduction to TypeScript basics, including type annotations and return types, and see how TypeScript, a JavaScript superset, boosts Intellisense, readability, and safety.
Explore the updated 100 files with added unit tests and spec files, and learn to run npm test to see console logs and debug your solutions.
Open a terminal in the repository, run npm install to fetch dependencies from package.json, and use npm test to run the tests.
Run the test suite with npm test or test a file with npm run test file <path>, locate spec file, and see failures from unimplemented logic as you test incrementally.
Turning our tests back on, this lecture demonstrates un-skipping tests, adding and running unit tests, and validating simple cases such as 1 and 2 yield 3, and 3 yield 5.
Learn to compute the median value of an integer array for absolute values sum minimization, using the left element for even lengths and plain implementations in JavaScript or TypeScript.
Write a function that adds two numbers, then extend it to accept any number of inputs using the rest operator, returning the total in TypeScript.
Build an asterisk border around strings using concat, shift, and push, then add top and bottom walls and wrap each line with a for loop.
Compute the sum of digits of a two-digit number by converting it to a string, splitting into digits, and reducing them to the total.
Find the largest product of adjacent elements in an integer array by iterating the array, initializing the baseline with the first input, and updating the maximum.
Learn to find all longest strings in an array in two passes: first compute the maximum length, then collect strings that match that length.
Explore almost increasing sequences by analyzing an array of integers from left to right, counting out-of-order elements, and using a simple pass/fail logic to allow at most one disruption.
Learn the alphabetic shift algorithm: input a string and shift each letter forward by one, wrap z to a, using split, index, and join; compare array and dictionary methods.
Explore how to verify an alphabet subsequence by converting a string to characters, extracting ASCII codes, using a set to detect duplicates, and checking for increasing order.
Learn to compute alternating sums in an array by summing even and odd indexed elements separately, initializing sums, iterating with a for loop, and returning the results.
Determine if two arrays are similar by a single swap, using temporary arrays, string comparisons, and a reverse operation to test if swapping yields equality in examples.
Given an array of integers, compute how many shifts are needed to make it strictly increasing by in-place adjustments and difference counting.
Explore an array conversion: pair adjacent numbers, add for odd, multiply for even, and reduce to a single value using a while loop, a helper function, and recursion.
Determine the maximum sum of any consecutive subarray of length k by sliding a window: subtract the left value, add the right value, and update the max as you iterate.
Compute the maximal adjacent difference in an array by tracking absolute differences of neighboring elements using Math.abs, iterating through the array, and updating the max difference.
Learn to implement the array previous less algorithm: for each position, find the nearest previous value smaller than the current, or output -1 if none, using backward loops and shifting.
Iterate through the input array to replace each occurrence of the target element with a substitute, returning the modified array.
Sort the array, compute the largest value plus one, and test jump distances up to that limit using modulo checks to avoid obstacles and count valid touches.
This lecture explains a boolean algorithm to determine if a bishop can hit a pawn on a chessboard by mapping letters to numbers and comparing coordinate sums, reflecting same-color squares.
Apply the box blur by averaging the 3 by 3 neighborhood around each center pixel, rounding down the result, and omitting edge pixels while handling edge cases with nested loops.
Use floor division to distribute candies evenly: compute floor(candies / children) and multiply by children to drop leftovers, as illustrated with three kids and ten candies.
Determine a case-insensitive palindrome by converting the input to lowercase, reversing the characters, and comparing with the original string using split, reverse, and join.
Compute the century from a four-digit year by applying floor(year/100) and adjusting for exact multiples of 100, with edge cases shown by 1005 yielding 20 and 1700 yielding 17.
Parse a single input that may be a character or a numeric string. Determine parity for numbers and return not a digit when the input is not a number.
Check palindrome by lowercasing, splitting into characters, reversing, joining, and comparing to the original. You can also use a for loop to check without the extra steps.
Learn to determine if two chessboard cells like a1 and c3 share the same color by mapping letters to numbers and using parity checks with modulo two.
Chunk the input array into nested subarrays of a fixed size using slice, returning a new nested array with leftovers. Implement with a while loop and push.
Solve the common character count between two strings by building character lists with a helper function, counting occurrences in objects, then summing the shared minimum counts to return the total.
Compute the bot's answers by averaging the times of trainer responses that were correct. Return 0 if no correct answers exist, and learn to process training data and task results.
Compare integers by parsing two string inputs and returning 'less', 'greater', or 'equal' using a single return with a double ternary.
Group an array of numbers into start and end ranges by extending end points when numbers are consecutive, then convert the ranges to a string.
Determine if a string ends with a given suffix without using the endswith method by calculating the start index, extracting the substring, and returning a boolean.
Sort the input array, iterate to compare adjacent values, and return true if duplicates exist; otherwise return false.
Convert Celsius to Fahrenheit using the formula C times 9/5 plus 32, and practice reading instructions while applying basic math operators in this beginner-friendly algorithm.
Verify whether the second string can be formed from the first by removing letters, using split into characters and an index to build a match, then return true or false.
Explore crossing sum, a multi-dimensional array algorithm that sums the cross area in a two-dimensional matrix by iterating a row and column and using reduce.
Calculate the year a deposit reaches a threshold by applying a yearly rate of return. Demonstrate with a while loop that updates account starting at 100 with 20 percent return.
Count the number of different symbols in a string by turning it into a character array and collecting unique chars with includes and push, then return the length.
Explore digit degree by repeatedly summing a number's digits until a single digit remains, counting iterations from examples like 91, and implement with string split and reduce in code.
Split each domain name on dots and inspect the last label to classify it as organization, commercial, info, or net. Fill a domain type array with the corresponding type.
Enclose the input string in brackets using ES6 string interpolation with a dollar sign and double curly braces, passing the parameter for a clean, compact solution.
Convert the number to a string, split into digits, and use an every check to guarantee each digit is even by parsing digits as integers.
Extract every k-th element from an array by filtering, using the index plus one and modulo to exclude every k-th item, and return the resulting array.
Extract the column from a two-dimensional array by iterating over each row and pushing the column value into a result array, then return the array.
Compute a factorial by initializing total to 1 and multiplying by each i from 1 to n, then return the accumulated product.
Learn to reverse-iterate a rank-ordered list of ride fares to find the first option whose fare times the length of the ride stays under $20, returning that Uber option.
Implement a fare estimator with cost per minute, cost per mile, and ride distances, using a math-based algorithm to push fares into an array and return the computed costs.
This lecture presents fermactor: find i and j such that i^2 minus j^2 equals n using a nested loop and pow, returning [i, j] (example 15 yields 4 and 1).
Identify the closest pair of numbers that sum to five using a brute force, nested loop approach and absolute index distance, returning -1 if no pair exists.
Extracts an email domain using lastIndexOf and slice, showing a regex-free approach with a concise two-method solution that handles various input cases.
Learn how to extract the left most digit from a string by building a 0–9 digits array, splitting the input into characters, and returning the match with a for loop.
Learn to find the first duplicate in an array by mapping values with an object and using hasOwnProperty, returning the duplicate or -1 if none.
Explore solving the first not repeating character problem by counting characters and tracking their first indices with a single-pass extra-memory approach, avoiding nested loops for efficiency.
Learn how to flatten a deeply nested array using recursion, by iterating through elements, recursively flattening subarrays, and pushing non-array values into a single result array.
Monitor a growing plant that grows by the up speed each day and loses height by the down speed at night, then compute the days to reach the desired height.
Learn to sum values in an array until a zero is encountered, using a running total and an early return, as illustrated by the house number sum.
Determine all possible numbers of people and cats in a house from total legs using a while loop and an array to track counts; includes edge cases and refactoring notes.
Explore a string-based algorithm to derive an HTML end tag from a given start tag, using string splitting, iterating characters, and handling edge cases.
Implement a password lockout algorithm that locks the account after more than ten consecutive failed attempts, resets the counter on a correct entry, and signals lockout by returning true.
Convert a number to a fixed-width string by chopping digits when width is smaller, padding with leading zeros when wider, covering three edge cases and refactoring.
Learn how to extract the file ids for changes with a later backup time, using iteration, removing duplicates, and sorting for a clean result.
Determine if a number is lucky by converting it to a string, splitting digits into two equal halves, summing each half, and comparing the totals to return true or false.
Explore how to determine a tandem repeat by checking if a string has even length, slicing it into equal halves, and comparing them; odd lengths return false.
Identify the largest number in each of four nested arrays and return them as an array by iterating through each sub-array, updating a max variable, and collecting results.
build the largest number by turning a single digit into a string of 9s, then parse it to an integer, using concatenation and repeat as needed.
Convert total minutes into an hour:minute format using string manipulation and arithmetic; compute hours via floor division by 60 and minutes via modulo, then demonstrate map, split, and reduce techniques.
Validate the launch sequence by tracking each system's previous step in an object, using hasOwnProperty, and ensure each subsequent step increases; return true or false accordingly.
Extract the longest digits prefix from a string by iterating characters until a non-digit appears, comparing a complex push-join method with a cleaner parse-based solution using 0–9.
Calculate the total cost of all available rooms in a 2d matrix by skipping zeros and ignoring values below haunted floors in each column.
Explore the max multiple problem by using modulo to compute the bound modulo the divisor, then return the bound minus the remainder, illustrated with 3 and 10.
Compare the input string to a full alphabet and return the first missing letter, or undefined if all letters from a to z are present.
Learn to convert a single letter to a numeral sequence by using ascii values, char code, and string from char code, building a numerals array through incremental loops.
Explore palindrome rearranging in the 100 algorithms challenge: determine if a string can be rearranged into a palindrome by counting character frequencies and allowing at most one odd count.
Compute how many page numbers can be printed from the current page with given ink. Convert numbers to strings to count digits, updating the current page, and return last page.
Create a pig latin translator that appends 'way' to vowel-start words and moves leading consonants to the end, then appends 'ay', using split, regular expression, and join.
Develop pro categorization by building a triple nested array that maps each profession to its matching professionals based on preferences, using a double nested loop, hasOwnProperty, lowercasing, and sorting.
Pass strings as proper names by capitalizing the first character and lowercasing the rest, using techniques like uppercasing the first char, slicing, and concatenation, as in Paris or John.
Compute each pro's average rating from a 1–5 scale and compare it to a configurable threshold. Return the indices of those below the threshold for manual review.
Learn to reflect a string by mapping each lowercase character to its opposite on the alphabet using a reflection dictionary, iterating characters, and concatenating the results.
Learn two ways to reverse a string: convert to a character array, reverse, and join; or build the reverse with a backward for loop, which is faster.
Model the theater as a grid with x and y coordinates to count interrupted seats. Multiply (columns minus current column plus one) by (rows minus current row).
Learn to compute the difference between two arrays by filtering the first array to those not contained in the second, using includes, with notes on a faster map-based approach.
Solve a shape area puzzle by building a growing plus shape of squares; total increases by 4 per step, yielding 5 squares at n=2 and 13 at n=3.
Sort by height demonstrates sorting a numeric array while leaving negative placeholders fixed. Filter out negatives, sort the rest, then reinsert values into non-negative positions.
Sort strings by length in ascending order using a one-line array sort with a length-based comparator. The lecture demonstrates comparing string lengths to produce a correctly ordered result.
Build a code dictionary mapping digits 0–9 to a–j, split the input into characters, swap via hasOwnProperty lookups, and assemble the translated message; discuss a concise refactor.
Learn strings construction by counting character frequencies and calculating how many times string a can be formed from string b with alphabet counts, floor division, and missing character checks.
Learn to sum all prime numbers with a nested loop algorithm, starting at two, verifying primality and updating a running total of positive primes.
Compute the sum of all odd Fibonacci numbers up to a given input by iterating Fibonacci numbers with three variables: previous, current, and result, updating them as you go.
Construct a square digits sequence by splitting numbers into digits, squaring them, summing, and iterating until a duplicate appears, counting iterations for the 100 algorithms challenge.
Iterate through an array of ones and zeros, turning off each lit light and swapping subsequent values as you go. Implement a swap lights function to update and return the transformed array.
Determine if one value from array one and one from array two can sum to 42 by building a hash map of needed differences and checking each element.
Organize tasks into today, upcoming, and later using array destructuring and a day-based deadline rubric, classifying values by exact day and within a week.
Compute how many unique digit products appear from an array of numbers by turning each number into digits, multiplying them, and collecting distinct results in a products array.
Validate a time string in hh:mm by splitting at the colon, then ensure hours are 0–23 and minutes 0–59, returning a boolean. Handle negative and out‑of‑range values.
Explore how to handle phone screen interviews for javascript topics, learn the question-answer-code explanation approach, and communicate solutions clearly during technical interviews.
handle technical interview stress by honestly saying you don’t know and outlining what you would infer from your knowledge of javascript, rather than bluffing about react.
Learn to answer questions fully by providing examples and correct terminology, including double equals and triple equals, and by asking clarifying questions when needed.
Compare double equals and triple equals in JavaScript: == checks value, === checks value and type. '5' == 5 is true, '5' === 5 is false; use strict equality.
Explore how closure in JavaScript captures variables from a parent function and returns a function that retains access. See a counter that increments across calls, showing persistent state without globals.
Explore lexical scope versus block scope, explaining var, let, and const, hoisting, and how scope affects for loops and runtime errors.
Explain the difference between double equals and triple equals in JavaScript, where double equals checks value and triple equals checks value and type. Use a string five versus number five.
Explore how strict mode in JavaScript enforces stricter rules by placing 'use strict' at the top of a file to prevent accidental global variables, aided by linters.
Learn how the delete keyword in JavaScript removes an object property or an array element. Watch deletions reveal JavaScript's dynamic nature by removing properties and yielding undefined for array slots.
Explore how the keyword this defines the context in javascript, and see how to access class properties such as feet and methods using this dot in constructors and objects.
Celebrate finishing the 100 algorithms challenge and appreciate your accomplishment while committing to ongoing growth as a software engineer by improving problem solving, refining your portfolio, and using recommended resources.
Explore essential books such as clean code, clean architecture, the clean coder, and cracking the code in an interview to boost interview prep, architecture understanding, testing, and professional software development.
Practice mock interviews using the rubber ducky method and platforms like Preamp, with options across data science, front end, system design, product management, and data structures and algorithms.
Technical interviews are the filter between good and great developers. At least that is how the industry sees it. In this course we will up your problem solving ability and speed with 100 algorithm problems and solutions.
These questions are some of the most common ones asked in interviews. A portion are questions that come from companies like Google, Facebook, Uber, Amazon etc.
By the end of the course you will be: