Logo
    Search

    arrays

    Explore "arrays" with insightful episodes like "How to Find the Product of All Elements in an Array Except Self - Blind 75 LeetCode", "What's New in Javascript" and "20 JavaScript Array and Object Methods to make you a better developer" from podcasts like ""Programming Tech Brief By HackerNoon", "Syntax - Tasty Web Development Treats" and "Syntax - Tasty Web Development Treats"" and more!

    Episodes (3)

    How to Find the Product of All Elements in an Array Except Self - Blind 75 LeetCode

    How to Find the Product of All Elements in an Array Except Self - Blind 75 LeetCode

    This story was originally published on HackerNoon at: https://hackernoon.com/how-to-find-the-product-of-all-elements-in-an-array-except-self-blind-75-leetcode.
    How to Find the Product of All Elements in an Array Except Self? You must write an algorithm that runs in O(n) time and without using the division operation.
    Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #programming, #java-programming, #leetcode, #arrays, #programming-tips, #coding, #coding-interviews, #coding-challenge, #hackernoon-es, and more.

    This story was written by: @rakhmedovrs. Learn more about this writer by checking @rakhmedovrs's about page, and for more stories, please visit hackernoon.com.

    Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[I]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must write an algorithm that runs in O(n) time and without using the division operation.

    What's New in Javascript

    What's New in Javascript

    In this episode of Syntax, Scott and Wes talk about what is new in Javascript — a whole bunch of new stuff that you can use now and in the next sixth months or so.

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

    Freshbooks - Sponsor

    Get a 30 day free trial of Freshbooks at freshbooks.com/syntax and put SYNTAX in the “How did you hear about us?” section.

    Show Notes

    ES2019

    04:03 - Array.flatMap()
    05:30 - Array.flat()
    07:37 - Array.fromEntries()
    09:50 - String.trimStart() and String.trimEnd()
    11:23 - Function.toString()
    11:57 - Object Key Order

    1. Integer keys in ascending order (and strings like “1” that parse as ints)
    2. String keys, in insertion order (ES2015 guarantees this and all browsers comply)
    3. Symbol names, in insertion order (ES2015 guarantees this and all browsers comply)

    ES2020

    14:50 - Big int
    18:09 - Nullish coalescing
    20:57 - Optional Chaining
    24:55 - promise.allSettled
    25:33 - Dynamic import
    27:14 - string.matchAll(regex) and string.replaceAll
    29:30 - globalThis
    30:44 - Module Namespace Exports
    33:11 - Navigator.share() API
    36:34 - Async Hooks
    37:39 - Pipline Operator
    39:59 - Top Level Await

    Links

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats!

    20 JavaScript Array and Object Methods to make you a better developer

    20 JavaScript Array and Object Methods to make you a better developer

    Wes and Scott rattle through ~20 different Object and Arra Methods that will make you a better JavaScript developer.

    Freshbooks - Sponsor

    This is episode Wes mentions the free book Breaking The Time Barrier. Get a 30 day free trial of Freshbooks at freshbooks.com/syntax.

    Netlify — Sponsor

    Netlify is the best way to deploy and host a front-end website. All the features developers need right out of the box: Global CDN, Continuous Deployment, one click HTTPS and more. Hit up netlify.com/syntax for more info.

    They are also hiring! netlify.com/careers

    Show Notes

    For the docs for all these, just google mdn and the method you are looking for 😃

    3:00

    • Why are these great?
    • They are chainable
    • Immutable

    5:30

    • .filter()
    • Truthy or Falsy

    8:00

    • .map()

    10:00

    • .reduce() - returns any shape! filter, create a new shape, add up numbers...

    14:30

    • .forEach()
    • Side effects

    16:00

    • .some()
    • can be used as a short circuit forEach

    25:00

    • .every()
    • .includes() (why not contains?)

    26:00

    • Array.from()
    • Array.from() takes a secondary map arg
    • Array.of()

    29:00

    • Object.values()
    • Object.keys()
    • Object.entries()

    32:00

    • Array spread - converts iterable to array
    • Array spread - Concats arrays
    • Array Spread + Slice. Don't splice - remove an item from an array.

    34:00

    • Object Spread

    37:00

    • Function Rest

    39:00

    • Object.freeze()

    40:00

    • Object.seal()

    41:00

    Shameless Plugs

    Tweet us your tasty treats!