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
Summary

Summary DSA course

Rating
-
Sold
-
Pages
20
Uploaded on
01-03-2023
Written in
2022/2023

Let's start this, in some months, we will be creating something unimaginable. The quality of video, audio, and teaching will be paid courses. Even if you have a paid course, you will still learn from this playlist. All lectures will be uploaded in 4K because I want this to run for years, so expect a bit of delay, because processing and everything do take a bit of time.

Show more Read less
Institution
Course

Content preview

C++ Basics in One Shot - Strivers A2Z DSA
Course - L1
take U forward

This is a full-fledged interview preparation website that I run on my
end so if you 're someone who has three months to like six months of
time left for interviews I will definitely ask you how to check this
Strivers SD sheet. This is one of the most followed resources in the
country as of now what does this resource gives you it gives you 119
well curated problems such that all your DS algo Concepts will be
covered. You should definitely check out coding ninjas because web
development okay data Stitch algorithm foreign County there 's a link
in the description make sure you check them out I 'll be using vs code
in order to code I'll be writing my C plus plus code over here and
whatever the code generates as an output will be produced over here.
In the next video we will be covering Java 1. C plus plus we can use the
hash include so hash include i o stream imagine if you want to use
something like a math dot h I 'll be talking about radical functions
afterwards. C out is a function which exists under the STD and double
colon so in order to use C out you have to write STD.

Program always uses STD for all the functions for most of the functions
you have to write STD double colon double Corner. If you compile it
prints everything now it looks a easier task is n't it so this is how you
can easily write okay now let 's quickly have an input imagine you
want to take an input. It's going to take you a lot of time this is where
C plus plus C is a I 've got something better for you I say can I write
bits STD C plus Plus C plusplus C. It includes all the libraries everything
whatever libraries are there in C plus. plus plus. everything is included
under this bits slash stdc pluscplus plus dot h. We will be specifically
using two data types float and double again they have ranges
depending on the Range that you use you 'll be using float or double
the ranges are visible on the screen. If you want to store bigger
numbers than this this is where something like long long will come in
so if you are saying long long it will give you a wider range.

If we use something like get line inside the get line you have to write
CN what is get line again do not need to dig deep it's an internal
function. The moment you click enter the next line will not be picked
up so it just picks up till the line break so string and get line is used to
take any of the string. Character can store all of the 256 characters in
English dictionary. If we have something like a 10 and that 10 can be
stored in all the three or all the five why ca n't we use simply long long
or maybe double? Everything takes up a certain space in your
computer so depending on that we decide what to use now integer has
a range now those numbers you can't uh remember so what I usually
do is I keep a rounding of number like I know integer will be from

,minus 10 to the power 9 to 10 to power 9. If you are greater than
equal to 18 then I can say you are an adult you're an adult yes or if
you are lesser than 18 E1 not an adult. If you omit the else statement
what will happen is the 15 will be taken as the input and the if will not
be executed and will not find an else.

The problem is very simple school has following rules for grading
system below 25 grade f 25 to 44 grade e 45 to 40 49 ready and so on
so your task is to ask user to enter marks and print the corresponding
grade okay so what is the first reading get the marks. Backslash
asterisk is how you can do it a single line. If 24 is true over here none
of these lines will be executed because it states else it will never go
there and it will not be executed so you 'll be saving a lot of time
previously in every F was executed so this is why else if will be written
now another thing you 're having 24. marks is going and checking this
set imagine the marks are something like 86. If the age is smaller than
18 you can print this and all the conditions are given to you so
something we know uh for sure is we need age right so we can take
the scene of H now we know something if H is uh smaller than H then
we got ta print something like not eligible per job. If it is greater than
equal to 18 you will be printing eligible for job. But if it is between 55
and 57 eligible for the job but retirement soon that is what you have to
print got it right.

Time and Space Complexity - Strivers A2Z
DSA Course
take U forward

This is the continuation of Strivers A to Z DSA course slash cheat so uh
if you remember in the previous video we have covered all of these
green TIG Mark things. This video will be covering the time complexity
learn Basics and then analyze the next steps. Eventually when you
complete all the steps or all the problems you will have a very very
good hold on time complexity. Time complexity can not be said as
time taken because it is dependent on system it is different dependent
on configuration right so this is why that is this is the first point time
taken is never equal to time taken. Time complexity is what you call As
Time complexity depending on the input if they are giving you more
input it might end up taking a certain more time so the rate at which
the time increases is what is generically referred as time complexity.
Raj explains how to compute the time complexity or the Big O of a
piece of code. Raj says that in all the interviews that you're going to
give or all the examinations if you 're writing a code they will ask you
to analyze the time that is when you do not like you will not say two
seconds no you will say it in terms of bigon notation.

, There are three things that have written always compute time
complexity in terms of worst case scenario. One is the best case, the
average case and the other one is the worst case. what you write and
this is time complexity it runs for 15 times but this is a number this is
not a number you generally do not represent your code. Always yes
always compute the time complexity in terms of worst case scenario.
The average case is the best plus worse and divided by two it's it 's
the median of it so self-explanatory if you 're building a system will
you build it for one person or or will you. you say that your code runs
in week of four obviously you will say we go for because that might be
the worst case that the computer might encounter when it is given an
input. Beagle notation is what you will be expressing your code in
interviews. Avoid constants because whenever the input size is very
large those constants have very less significance. Avoid lower values
which does not change its significance by much so avoid lower values
correct. Bigo notation is always the highest complex or the worst case
complexity.

You'll find different teachers on YouTube if you are learning from me
you 're learning for interviews for coding rounds for problem solving
abilities not for your semester exam so please do not comment that
you did not teach the mathematical derivation because that is not
required while problem solving right so you know how to compute
picona. for n n every time it is running for n and n so can I say it 's
running for exactly n times how many times is it running so we go off n
square is what is the time complexity of this particular let 's say the
next example and try to compute the time. complexity. of this one so
it is the number of iterations it is taking again I 'm taking the overall
iterations now first. first time is one equation next time 2 x m is 3 and
X7 is 4 so on Del Nitric. Time complexity is the memory space that
your program takes in a very very naive term when I talk about
memory space again it will vary from machine to machine so you can
not be dependent on the machine and that is why again in order to
complete base complexity we will be using the bigo notation again.
Space complexity is nothing but auxiliary space Plus input space.

If you use any extra variable or extra space to solve the problem that
is what you refer as auxiliary space and combined I can say this is the
space complexity. In an interview you will have to say it in terms of
bigo of something not bytes KB MB so for example if I Define an array
of size n it means I 'm consuming B go of n size or n space complexity
so in an interview. The more problems you solve the space complexity
gets into your head in a much much better way so before ending up
this lecture in case you are into competitive programming then
remember one thing over there you do not run your codes on your
MacBook or your windows whatever code you write you send it to the
server. Remember that most of the servers most of us are take one
second for roughly 10 to the power 8 operations. The next lecture will
be about uh do all these patterns each other 22 of them in the next

Written for

Course

Document information

Uploaded on
March 1, 2023
Number of pages
20
Written in
2022/2023
Type
SUMMARY

Subjects

$8.99
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
asimshaikh1

Get to know the seller

Seller avatar
asimshaikh1 satpuda
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
5
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