Placeholder Image

字幕表 動画を再生する

  • Hey everyone. In this video, I'm going to give you an introduction to Big O notation and time complexity.

  • These concepts basically give you one way of describing how the time it takes to run your function

  • grows as the size of the input grows.

  • To see what I mean by that exactly, let's take a look at a few examples here.

  • First of all, let's say you are given an array like this and let's say that this array could be of any lengths.

  • It could be one hundred elements long, a thousand elements long or even one hundred thousand elements.

  • And let's say you want to write a function that takes this array and returns the sum of all the numbers in this array.

  • So, in your function you wanna add up all the numbers of this array and returns the sum.

  • And that function might look like this function right here and I'm gonna use pseudocode here to write this function.

  • So, first of all let's define our function that gonna be called find sum which is going to take given array

  • as input and then inside this function first of all we gonna initialize a variable called

  • total to 0 and then for each i in this given array or for each number total to 0

Hey everyone. In this video, I'm going to give you an introduction to Big O notation and time complexity.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

A2 初級

ビッグオー記法と時間的複雑性入門 (データ構造とアルゴリズム #7) (Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7))

  • 2 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語