How I Learnt Logic Building (My Secret)

How I Learnt Logic Building (My Secret)


How I Learnt Logic Building (My Secret)

How we can built logic as a beginner. When I started my journey I always used to think that coding is not for me. But later I realized that if I don’t give me a shot, How can I judge myself without trying. I used some personal strategy to improve my coding, I Hope it will be helpful for you guys also. DSA is a heart of placement.

connect to me on Instagram: https://rohit978.page.link/insta
Linkedin: https://rohit978.page.link/linkedin
Telegram: https://rohit978.page.link/telegram
Telegram: rohit_negi_family


Content

0 -> When I saw a coding problem
3.584 -> my brain became completely blank.
5.947 -> I cannot understand where to start with that problem.
8.425 -> So a lot of friends faced this problem.
11.137 -> I personally relate to this problem.
12.424 -> This thing also happens to me.
14.251 -> So in today's video, I am going to teach
15.441 -> you how you can build your logic.
17.353 -> by which your brain will never be blank when you see a new question.
21.21 -> So let's start the video.
22.475 ->
25.768 -> There are a lot of students whose dream company is FAANG
28.654 -> or any product-based company,
30.423 -> but you are unable to achieve them
32.79 -> because you do not have consistency.
35.412 -> You have to accept it.
36.85 -> so to disor it i am giving you my whatsapp no 8885664702,
40.234 -> you can ping me here
41.853 -> where i will share regular status
43.155 -> and also i will give you questions.
46.073 -> I always said that if you want to solve any problem in terminology,
51.103 -> then you have already solved the same problem in the real world,
54.654 -> but here we can do it faster.
57.614 -> Now I am giving you a simple example.
59.975 -> Just imagine you are in the 1960s
61.897 -> and you have to write a love letter for your girlfriend.
64.474 -> What will you do?
66.141 -> You will write the letter, go to the post office,
68.012 -> keep it in an envelope, write the address,
70.927 -> and post it.
71.873 -> And today, what will you do?
73.975 -> Now you will write the letter,
75.483 -> type her email address,
77.761 -> and send it to her email address.
78.821 -> In both situations, you send the letter to her address,
81.52 -> that person recived this by this particular address.
83.493 -> but the time gap has become shorter.
87.168 -> in the real world it takes time for 2-3 weeks for delevery
89.806 -> and it makes it takes some second  and without taking any cost  .
94.234 -> In this way, we should start our coding journey.
96.515 -> We have to relate this coding to our real world
100.06 -> to understand why this concept is needed.
104.379 -> Now, with an example, I will make you understand properly.
107.678 -> Let you have an array and its size N;
110.344 -> the new students, please don't panic,
112.95 -> and n is ODD.
115.819 -> let N = 5 . let 1,2,1,2,3 .
119.376 -> All the elements are used twice.
122.031 -> You can see only one element being used at a time. you can see that is 3.
124.773 -> Now I have to find the unique element.
127.508 -> now in real world how you solve this problem ?
129.612 -> we take 1 , 2  and 3 as a coin
134.243 -> and arrange it to the assending  order .
136.502 -> and then you will find that the 3-digit coin is unique.
139.778 -> but now in coding, how can we solve the problem?
141.742 -> I will sort the array in asending order.
145.616 -> and when I arrange it in an ascending order,
147.771 -> I get to know that 3 is the unique number.
149.955 -> Now it depends on which algorithm I am using.
152.981 -> I can use a simple algorithm named bubble sort.
155.841 -> What is the time complexity of bubble sort? 0[n2] .
158.594 -> If I optimise it more,
160.027 -> then I can use merge sort or quick sort,
162.065 -> whose complexity is [n log]n.
163.775 -> So in this way, I will get my answer
165.647 -> then you ask, "Brother, is O[nlogn] the answer,
167.751 -> then the answer is no. if you see it more and more times and have to research it again and again
170.225 -> the first time when I have answer it
172.618 -> I have got the maximum answer of O[nlogn] .
175.005 -> At that time, I had read Marge Sort and Quick Sort.
177.718 -> but if you read it in more detail,
179.138 -> then you will get an operation named XOR.
181.459 -> what is Xor operation brother ?
183.49 -> What we see is that if you xor in 1, then the answer is 0;
185.349 -> if you do 0,1 then it is 1;
187.07 -> if it is 1,0 then it is 1; and if it is 0,0 then it is 0;
190.004 -> So here Xor gives us the same;
191.793 -> when we do Xor on two same coins, it gives 0
195.501 -> in this way, when we do the complete operation of our array, at the end, 3 will return.
202.206 -> In this way, we solve it in the order of n times.
204.491 -> 0[n]
204.991 -> There are a lot of students among you who are new to programming
208.803 -> and don't know how we got the time complexity and space complexity.
211.188 -> So these are all you will learn according to time.
213.42 -> The motive of this question is that any question we get,
215.804 -> we have to relate it to the real world.
217.812 -> At least you will get the answer to what is
220.949 -> then you will optimise it and get the scent percent of answers.
224.397 -> The second thing that you are doing is focusing on concepts.
227.523 -> that the thing you are reading, try to focus on it.
230.527 -> read consciously. the thing you are reading don't read it lay down
234.279 -> or while eating popcorn .
238.052 -> See friend, in this way nothing will happen.
240.189 -> Some students are reading topics but not practicing anything.
242.693 -> Until you are practising anything, you will not get results faster.
244.645 -> We are a lot who are watching cricket,
247.956 -> and we know that Kohli is out in an offside position.
250.594 -> Suresh Rina is generally outs in the hook.
252.546 -> But in ground, if we are trying to do the same thing,
257.165 -> we are unable to do it because we have never practised it.
259.091 -> In this way, until we practise it, we will not get any result.
263.524 -> remember it , the videos and the lectures you are watching
266.761 -> it will results 10 percent of 90 percent depends on your practice .
268.918 -> depends on how you are practising
270.307 -> . If you are reading anything, then analyse
273.88 -> it to see how it works. find how it works in real world .
277.218 -> This is how wee should read it
283.292 -> I am telling you that DSA is the result of two things,
285.295 -> and if you read these two things properly, time complexity and space complexity,
288.775 -> it works as much faster as your code is optimised.
291.276 -> If you complete these two things, the complete DSA is working in this.
294.979 -> But these two things are most important in DSA.
301.494 -> time complexity and space complexity
303.279 -> now if you ask that what are this two things.
305.039 -> then research this .
307.311 -> You will get the answer
308.697 -> Don't learn any concept randomly.
312.23 -> If you read anything randomly,
315.946 -> you will not understand the concept.
319.361 -> Imagine a student reading directly about the recursion
322.27 -> and not knowing anything about arrays
323.612 -> . How will he understand the recursion?
324.921 -> the topic you are reading in a systematic way.
328.343 -> those who here about this things
329.978 -> they read towards linking them again and again
331.565 -> Just like you are reading an array,
333.655 -> we have some limitations in an array.
335.638 -> and when we read stack, there are also some limitations in stack.
339.281 -> after these all limitations we turn over in queue .
341.313 -> Now which is used where these all we will know after practicing.
345.495 -> so after reading the array,
347.552 -> you are solving how much questions.
349.006 -> how much questions are enough for array ?
350.599 -> so there are Easy Medium and Hard
353.182 -> start with easy questions .
354.576 -> We should start with easy questions because they will build our confidence.
358.004 -> This makes an interesting topic or subject
362.104 -> All of these are related to each other.
365.566 -> I will do this until I have any confidence in it.
369.037 -> then I jump to medium,
370.721 -> and then hard.
371.662 -> i followed that i have solved 30 % easy questions
375.439 -> and 50 % medium questions
377.353 -> and 20 % hard questions .
379.539 -> so you can also follow this pattern in your programming journey.
382.364 -> This will give you a lot of benefits.
384.663 -> The fourth point, which is the most important, is to make your schedule.
387.92 -> You have not made your timetable, and you don't know where your time is wasted.
391.919 -> If you are not keeping track of your time, you are making a big mistake. You must provide one hour per day during which I will code.
401.119 -> When it comes time to give, you'll say, "Bro, I'm available at any time." No, you have to give time in the morning.
405.759 -> Why only in the morning? There is no noise in the morning, and the entire ambiance is pleasant. so this time I can concentrate properly.
413.55 -> One more thing is important, but if you do this in the morning, you will not feel guilty the whole day.
418.928 -> reading; if you do not read during the day and also at night, you will feel guilty that I can read until the night.
423.625 -> but if you did it in the morning, then you will not feel guilty throughout the whole day. You can enjoy your life.
428.976 -> So in the morning is the best time, because at that time most of the people are asleep.
436.087 -> So in the morning, it is the best time to read. So in the morning, you can read peacefully; no WhatsApp and Instagram pings will come; and you can do your work better.
442.18 -> The fifth point is to reward yourself. You have a one-week challenge, and if you complete it, you must reward yourself.
453.291 -> After doing this, do something you enjoy, such as traveling, eating, Biriyani, or meeting with someone.
462.032 -> and this will give you a feeling of achievement. and then it will give you a lot of fun, too.
468.737 -> If you do all of these things carefully, your logic will improve. I stated that all problems should be related to the real world.
477.356 -> One more thing I will say to you: Progress creates addiction. If you are making progress, then you have to make it an addiction.
485.183 -> When you do coding on any coding platform, your ranking, like if you are in the 2 lahks to 4 lakh range, feels like an achievement, just as it does in games like PUBG, where it makes an addiction.
502.337 -> The same thing happens in your coding journey. If you start this journey in a good way, then it will become an addiction for you.
509.531 -> You focus on rank; I personally followed this when I was in IIT Guwahati; I was in rank one.
516.946 -> All are followed by rank until you are not making progress. If you are doing coding on any platform, you will get hoodies and t-shirts if you are doing well.
528.499 -> And remember, one good job can change the fortune of a whole family. I have personally seen this, and the neighbors are also motivated.
541.639 -> I want to be like him. I want to say this: if you are getting a job, then your future can change completely.
553.606 -> Money can solve a lot of problems. The person who is saying that money does not do anything should give him a bow with both hands.
558.147 -> Do not compare your first day with anyone's last day; you will never compare your first day with those who are coding for 100 days; your consistency can make you more perfect than him.
577.185 -> I have given you a 7-day challenge. You have to read for 1 hour, carefully. I have given my WhatsApp number. I will motivate you every day.
591.046 -> So tell me how you feel about this video, and if you have any doubts about it, ask them in the comment section.
596.553 -> So we will meet in any other new video, until Bye Bye.
600 -> BYE BYE

Source: https://www.youtube.com/watch?v=4bEgINdCM-Q