Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Coding Programming Language

Rating
-
Sold
-
Pages
8
Uploaded on
09-03-2023
Written in
2021/2022

This notes provide you overview of c++ programming language and data stuctures which is written by me with collaboration with coding ninjas and you can easily understand the all concepts of fundamentals of programming.

Institution
Course

Content preview

C++
Foundation
with
Data
Structures

Topic:
Time
Complexity























,

Introduction



An
important
question
while
programming
is:
How
efficient
is
an
algorithm
or
piece

of
code?




Efficiency
covers
lots
of
resources,
including:



•   CPU
(time)
usage

•   memory
usage

•   disk
usage

•   network
usage



All
are
important
but
we
are
mostly
concerned
about
CPU
time.




Be
careful
to
differentiate
between:



1.
Performance:
how
much
time/memory/disk/etc.
is
actually
used
when
a

program
is
run.
This
depends
on
the
machine,
compiler,
etc.
as
well
as
the
code
we

write.



2.
Complexity:
how
do
the
resource
requirements
of
a
program
or
algorithm
scale,

i.e.
what
happens
as
the
size
of
the
problem
being
solved
by
the
code
gets
larger.

Complexity
affects
performance
but
not
vice-­‐versa.

The
time
required
by
a
function/method
is
proportional
to
the
number
of
"basic

operations"
that
it
performs.




Here
are
some
examples
of
basic
operations:



•   one
arithmetic
operation
(e.g.
a+b
/
a*b)

•   one
assignment
(e.g.
int
x
=
5)

•   one
condition/test
(e.g.
x
==
0)

•   one
input
read
(e.g.
reading
a
variable
from
console)

•   one
output
write
(e.g.
writing
a
variable
on
console)



Some
functions/methods
perform
the
same
number
of
operations
every
time
they

are
called.


For
example,
the
size
function/method
of
the
string
class
always
performs
just
one

operation:
return
number
of
Items;
the
number
of
operations
is
independent
of
the

size
of
the
string.
We
say
that
functions/methods
like
this
(that
always
perform
a

fixed
number
of
basic
operations)
require
constant
time.

Written for

Course

Document information

Uploaded on
March 9, 2023
Number of pages
8
Written in
2021/2022
Type
OTHER
Person
Unknown

Subjects

$8.69
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
abhishekgupta1

Get to know the seller

Seller avatar
abhishekgupta1 Bansal Group
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions