Code With U-DAY
Code With U-DAY
  • 55
  • 34 847
Complete Guide: How to Register for ICPC || Step-by-Step Tutorial || Profile Creation
In this video, I walk you through the entire ICPC registration process for 2024, from start to finish. Whether you're a beginner or have registered before, this step-by-step tutorial covers every detail you need to successfully register your team.
What’s Covered in This Video:
Creating an ICPC account
Filling in personal and team details
Completing the team registration
Payment process and finalizing registration
By the end, you'll have everything set to participate in ICPC 2024 with your team. ICPC is a premier global competitive programming event, and registering properly is the first step toward competing with the best!
If this guide helps you, please like, share, and subscribe for more tutorials on competitive programming events.
Hashtags:
#ICPC2024 #ICPCRegistration #CompetitiveProgramming #ICPCGuide #StepByStepRegistration #ProgrammingContest #TeamRegistration #CodeCompetition #ICPC #CodingChallenges #RegistrationTutorial #ICPCProcess #ProgrammingCommunity #ICPC2025 #completeprocess #saiudaykiranshinagam #icpcamritapuri #icpckanpur #icpcchennai
Переглядів: 79

Відео

Infosys Specialist Programmer Interview Experience || Oncampus Drive || GVP 2025 Batch
Переглядів 6449 годин тому
In this video, I sit down with my friend Shubhankar to share his comprehensive journey through the Infosys Specialist Programmer interview process. This video provides an insider’s view into what it takes to succeed in one of Infosys' most coveted roles. What You'll Learn: The detailed breakdown of all interview rounds, from the initial assessment to the final technical and HR discussions. The ...
Find Minimum Time to Reach Last Room I & II || Dijkstra's Algorithm || Leetcode Weekly Contest 422
Переглядів 11412 годин тому
In this video, I provide a detailed walkthrough of solving LeetCode Weekly Contest 422 problems: "Find Minimum Time to Reach Last Room I" and its advanced version, "Find Minimum Time to Reach Last Room II." Using Dijkstra's algorithm, I demonstrate an efficient approach to handle these grid-based pathfinding problems. What's Covered: Explanation of the problem statement and constraints Step-by-...
JMAN Interview Experience || GVP On-Campus Drive || Complete Breakdown & Tips || 2025 Batch
Переглядів 14414 годин тому
In this video, we dive into Sai Teja’s detailed journey through the JMAN on-campus interview process at Gayatri Vidya Parishad College (GVP) for the Batch of 2025. Sai Teja shares insights from every stage of his JMAN interview experience, breaking down the types of technical and HR questions he encountered, his approach to coding challenges, and the strategies that helped him stand out. Throug...
Darwinbox Interview Experience || Only Selected Candidate Of GVP || OnCampus Process || 2025 Batch
Переглядів 19321 годину тому
In this video, I’m sharing the inspiring interview journey of Vethan, the only candidate from Visakhapatnam selected for Darwinbox. We go through his entire experience, including each interview stage, the types of questions he tackled, and the skills he focused on to stand out. From initial preparation to the final interview, Vethan shares his approach to the coding rounds, technical questions,...
Amazon 6 month SDE Internship Interview Experience | Best preparation Strategy | Off-Campus 2025
Переглядів 2 тис.Місяць тому
In this video, I’m sharing my personal journey of how I cracked the Amazon SDE Internship through Amazon HackOn, an off-campus opportunity for the Batch of 2025. I’ve covered every detail of my interview experience, from the initial stages to the final selection. Throughout this video, you’ll hear about the types of DSA questions I encountered and how I approached them, along with essential tip...
Darwinbox Interview Experience | Process, Pay Details & Tips | On-Campus Process | 2025 Batch
Переглядів 1,1 тис.Місяць тому
In this video, I’m sharing my friend’s experience with the Darwinbox interview process during the on-campus placement at Gayatri Vidya Parishad College of Engineering (Autonomous) for the Batch of 2025. We'll cover all aspects of the interview, including the various stages, types of technical and HR questions asked, and specific coding problems tackled during the process. Additionally, I’ll pro...
Zoho On-Campus Interview Process at GVPCE | 2025 Batch | Full Breakdown!
Переглядів 251Місяць тому
In this video, I dive deep into the Zoho on-campus recruitment process at Gayatri Vidya Parishad College of Engineering (GVPCE) for the 2025 batch. Get an inside look at the exact number of rounds, the questions asked, and the difficulty level. I also discuss the common mistakes made during the interview and how to avoid them. This is a must-watch for anyone preparing for Zoho placements-whethe...
3281. Maximize Score of Numbers in Ranges | Weekly Contest 414 | Leetcode
Переглядів 1,2 тис.2 місяці тому
🚀 Welcome, Coders! 🚀 In this video, I will explain how to solve the Maximize Score of Numbers in Ranges. 🔗 Problem Link: leetcode.com/problems/reach-end-of-array-with-max-score/description/ ⚡ Stay Connected with Me ⚡ 👨‍💻 LinkedIn: linkedin.com/in/shinagam-sai-uday-kiran ✨ Like, Share, and Subscribe! ✨ Hit the 🔔 bell icon to get notified for upcoming coding tutorials. 💡 Boost Your Competitive Pr...
3282. Reach End of Array With Max Score | Weekly Contest 414 | Leetcode
Переглядів 2182 місяці тому
🚀 Welcome, Coders! 🚀 In this video, I will explain how to solve the Reach End of Array With Max Score . 🔗 Problem Link: leetcode.com/problems/reach-end-of-array-with-max-score/description/ ⚡ Stay Connected with Me ⚡ 👨‍💻 LinkedIn: linkedin.com/in/shinagam-sai-uday-kiran ✨ Like, Share, and Subscribe! ✨ Hit the 🔔 bell icon to get notified for upcoming coding tutorials. 💡 Boost Your Competitive Pro...
CSES Flight Discount Problem | Dijkstra's Algorithm | Complete Walkthrough in C++
Переглядів 1112 місяці тому
🚀 Welcome, Coders! 🚀 In this video, I will explain how to solve the CSES Flight Discount Problem using the powerful Dijkstra's Algorithm. This is an essential problem for mastering graph algorithms and shortest path calculations, so stay tuned for a detailed explanation and efficient solution in C ! 🔗 Problem Link: cses.fi/problemset/task/1195/ ⚡ Stay Connected with Me ⚡ 👨‍💻 LinkedIn: linkedin....
9. Stick Lengths || CSES
Переглядів 1167 місяців тому
There are n sticks with some lengths. Your task is to modify the sticks so that each stick has the same length. You can either lengthen and shorten each stick. Both operations cost x where x is the difference between the new and original length. What is the minimum total cost? Input The first input line contains an integer n: the number of sticks. Then there are n integers: p_1,p_2,\ldots,p_n: ...
8. Maximum Subarray Sum || CSES
Переглядів 437 місяців тому
Given an array of n integers, your task is to find the maximum sum of values in a contiguous, nonempty subarray. Input The first input line has an integer n: the size of the array. The second line has n integers x_1,x_2,\dots,x_n: the array values. Output Print one integer: the maximum subarray sum.
7. Sum of Two Values || CSES
Переглядів 787 місяців тому
You are given an array of n integers, and your task is to find two values (at distinct positions) whose sum is x. Input The first input line has two integers n and x: the array size and the target sum. The second line has n integers a_1,a_2,\dots,a_n: the array values. Output Print two integers: the positions of the values. If there are several solutions, you may print any of them. If there are...
6. Movie Festival || CSES
Переглядів 1867 місяців тому
In a movie festival n movies will be shown. You know the starting and ending time of each movie. What is the maximum number of movies you can watch entirely? Input The first input line has an integer n: the number of movies. After this, there are n lines that describe the movies. Each line has two integers a and b: the starting and ending times of a movie. Output Print one integer: the maximum ...
5. Restuartant customers || CSES
Переглядів 658 місяців тому
5. Restuartant customers || CSES
4. Concert tickets || CSES
Переглядів 1438 місяців тому
4. Concert tickets || CSES
3. Ferris Wheel || CSES
Переглядів 648 місяців тому
3. Ferris Wheel || CSES
2. Apartments || CSES || Two pointer
Переглядів 488 місяців тому
2. Apartments || CSES || Two pointer
1. Distinct Numbers || CSES || Set
Переглядів 618 місяців тому
1. Distinct Numbers || CSES || Set
Counting Tilings || CSES Problem Set || Bitmask Dp
Переглядів 5669 місяців тому
Counting Tilings || CSES Problem Set || Bitmask Dp
2952. Minimum Number of Coins to be Added || 330. Patching Array || Weekly Contest 374 || Leetcode
Переглядів 1,6 тис.11 місяців тому
2952. Minimum Number of Coins to be Added || 330. Patching Array || Weekly Contest 374 || Leetcode
Maximise Score || Codechef Starters 86
Переглядів 289Рік тому
Maximise Score || Codechef Starters 86
String Game || Codechef Starters 86
Переглядів 623Рік тому
String Game || Codechef Starters 86
6317. Count the Number of Beautiful Subarrays || Weekly Contest 336
Переглядів 773Рік тому
6317. Count the Number of Beautiful Subarrays || Weekly Contest 336
B. minimum score by changing two elements - leetcode Biweekly contest 98 problem 6361
Переглядів 456Рік тому
B. minimum score by changing two elements - leetcode Biweekly contest 98 problem 6361
minimum impossible or || #leetcode || Biweekly contest - 98 || problem 6360
Переглядів 140Рік тому
minimum impossible or || #leetcode || Biweekly contest - 98 || problem 6360
B. Ideal point Codeforces || Educational Codeforces Round 143 (Rated for Div. 2) || #codeforces
Переглядів 271Рік тому
B. Ideal point Codeforces || Educational Codeforces Round 143 (Rated for Div. 2) || #codeforces
problem A two towers codeforces || Codeforces || educational codeforces round 143
Переглядів 746Рік тому
problem A two towers codeforces || Codeforces || educational codeforces round 143
Leetcode 2565 || subsequence with the minimum score || #Leetcode || Weekly Contest 332
Переглядів 340Рік тому
Leetcode 2565 || subsequence with the minimum score || #Leetcode || Weekly Contest 332

КОМЕНТАРІ

  • @sachinrajawat7437
    @sachinrajawat7437 7 годин тому

    Is there a different preliminary round for each region in ICPC, or is there only one round for all regionals? This time, the timings for the Amritapuri and Kanpur regions are the same.

    • @U-DAY
      @U-DAY 4 години тому

      Please go through this Instruction given in official website. Instruction : Pleased note that there will be a single Preliminary Online Contest for all three Regional Sites in India (i.e., Kanpur, Amritapuri, and Chennai). Each regional site will prepare its own rank list based on the teams registered for that site from the Preliminary Online Contest rankings. Teams participating in multiple regional sites are requested to keep the same team members for each Regional Site.

  • @vangala526durgabhavani2
    @vangala526durgabhavani2 День тому

    May i know interview will be in online mode or offline mode

    • @U-DAY
      @U-DAY День тому

      @@vangala526durgabhavani2 online

    • @theinfamous4231
      @theinfamous4231 17 годин тому

      Most probably online

  • @4rt15t
    @4rt15t 2 дні тому

    thank you!!!

  • @sahitihara8943
    @sahitihara8943 2 дні тому

    Great work uday !!! Congratulations subhankar 🎉

  • @PureSoul-y7q
    @PureSoul-y7q 3 дні тому

    is there scope for full time conversion?

    • @U-DAY
      @U-DAY 3 дні тому

      @@PureSoul-y7q yes

  • @shabankhan7719
    @shabankhan7719 3 дні тому

    You know 😢

    • @U-DAY
      @U-DAY 3 дні тому

      @@shabankhan7719 what happened

  • @AnjuMarina-sf6nt
    @AnjuMarina-sf6nt 3 дні тому

    Thank you senior ❤

  • @KarthikDances
    @KarthikDances 3 дні тому

    Recently i gave oa for amzon and i completed oa successfully like i passed all test cases and when will i get interview call like aprrox time if u have an idea?

    • @U-DAY
      @U-DAY 3 дні тому

      @@KarthikDances it's not guaranteed that you will get interview bcz almost everyone completes both . Your result can also be depended on those 70 behavioural questions

  • @balavardhanreddyvasipalli2627

    Congratulations Subhankar

  • @RamtenkiAnusha-e5j
    @RamtenkiAnusha-e5j 4 дні тому

    Are You shortlisted for intern ?

    • @U-DAY
      @U-DAY 4 дні тому

      @@RamtenkiAnusha-e5j yes

    • @ANUSHA-d6l2s
      @ANUSHA-d6l2s 4 дні тому

      How much stipend for intern

  • @vijayyyyyyyy6yyyyyyyy
    @vijayyyyyyyy6yyyyyyyy 4 дні тому

    can i use recursion + memo?

    • @U-DAY
      @U-DAY 4 дні тому

      @@vijayyyyyyyy6yyyyyyyy no it's not possible

  • @malavipande6693
    @malavipande6693 5 днів тому

    Hey Hi., Thank You for the video From the morning I am literally searching for good explanation approaches for these 2 problem. Like I have a doubt in the problem they mentioned that "Two rooms are adjacent if they share a common wall, either horizontally or vertically." You haven't talk about this need some clarity on this. In addition to that I have a small suggestion 1. I get what your saying but it would be even more good if you took 2 more examples while explaining 2. as Dijkstra's Algorithm relate graph problems you can also mention this as well. 3. explain while writing the code. Thank You !!

    • @U-DAY
      @U-DAY 5 днів тому

      @@malavipande6693 yeah sure thank you for the suggestions definitely I'll try to implement in my next videos

  • @thetravelblogger612
    @thetravelblogger612 6 днів тому

    Great work!! Need more of these

  • @SekharSunkari-o6p
    @SekharSunkari-o6p 6 днів тому

    Great work bro ! keep doing

  • @SekharSunkari-o6p
    @SekharSunkari-o6p 6 днів тому

    Great Work bro ! Keep Doing !

  • @U-DAY
    @U-DAY 6 днів тому

    Detailed Process from Selected Candidates : www.linkedin.com/posts/karthikeya-t_jman-activity-7256580715784351744-opT0?

  • @tbhanukarthikeya8613
    @tbhanukarthikeya8613 9 днів тому

    🔥

  • @artexplore4300
    @artexplore4300 10 днів тому

    Hey amazon has again given a chance for sde 6m role .. i want to apply for this time .. help me how to clear the test

    • @U-DAY
      @U-DAY 10 днів тому

      Most of the people get easy problems. So that won't be a big issue

    • @artexplore4300
      @artexplore4300 10 днів тому

      @@U-DAY how will the OA round be ?

    • @harshjain6639
      @harshjain6639 3 дні тому

      @artexplore4300 Same here .. I have recieved the OA Link for amazon sde intern 6m role . What questions can I expect @U-DAY ?

  • @AnyTimeMovie-forU
    @AnyTimeMovie-forU 18 днів тому

    hii i got shortlisted for the 2nd round virtual interview .... can you tell how the interview will be and what questions were asked

    • @U-DAY
      @U-DAY 17 днів тому

      www.linkedin.com/in/sri-varshith-singampalli-8a38a9253? You can ping him

  • @QuirkNinja-md8in
    @QuirkNinja-md8in 18 днів тому

    how many days it took to get notification after interview. i have completed my interview on 16th .

    • @U-DAY
      @U-DAY 17 днів тому

      @@QuirkNinja-md8in it would take more than a week

  • @ajayvempati237
    @ajayvempati237 28 днів тому

    how to construct the graph for 1st question in coding round2

    • @Chotu-v8c
      @Chotu-v8c 24 дні тому

      Did you get it?

    • @csec0565
      @csec0565 21 день тому

      from collections import deque # Function to add an edge between two nodes in the adjacency list def add_edge(adj, u, v): adj[u].append(v) adj[v].append(u) # Function to generate the figure/grid structure def generate_grid(n): fig = [[] for _ in range(n+1)] # Create a list of lists to hold grid structure start = 1 # For the growing half for i in range(1, n//2+1): for j in range(1, i*2): fig[i].append(start) start += 1 # For the shrinking half for i in range(n//2+1, n + 1): for j in range(1, (n-i+1)*2): fig[i].append(start) start += 1 return fig # Function to add edges in each row of the grid def add_row_edges(fig, adj, n): for i in range(1, n+1): for j in range(len(fig[i]) - 1): add_edge(adj, fig[i][j], fig[i][j+1]) # Function to add vertical edges between specific rows in the grid def add_diagonal_edges(fig, adj, n): # For the growing half for i in range(1, n//2): for j in range(len(fig[i])): if not((i%2) ^ fig[i][j] % 2): add_edge(adj, fig[i][j], fig[i][j] + i * 2) # For the middle row for j in range(len(fig[n//2])): if not((n//2 % 2) ^ fig[n//2][j] % 2): add_edge(adj, fig[n//2][j], fig[n//2][j] + n - 1) # For the shrinking half for i in range(n, n//2, -1): # Corrected to reverse order for j in range(len(fig[i])): if not((i%2) ^ fig[i][j] % 2): add_edge(adj, fig[i][j], fig[i][j] - (n - i + 1) * 2) # BFS function to calculate distances from node k def bfs(adj, k, tot_n): q = deque([k]) dist = [-1] * (tot_n+1) dist[k] = 0 while q: node = q.popleft() for neighbor in adj[node]: if dist[neighbor] == -1: dist[neighbor] = dist[node] + 1 q.append(neighbor) return dist # Input handling and main execution n, k = map(int, input().split()) fig = generate_grid(n) tot_n = sum(len(row) for row in fig) # Total number of nodes adj = [[] for _ in range(tot_n+1)] # Add edges between nodes add_row_edges(fig, adj, n) add_diagonal_edges(fig, adj, n) # Perform BFS and print the distances distances = bfs(adj, k, tot_n) print(distances[1:])

  • @achiever8006
    @achiever8006 Місяць тому

    when was his placement completed?

    • @U-DAY
      @U-DAY Місяць тому

      @@achiever8006 In September

  • @P.V.SIVARAMASASTRYSASTRY
    @P.V.SIVARAMASASTRYSASTRY Місяць тому

    Anna nee branch and year cheppu I want to Meet u

    • @U-DAY
      @U-DAY Місяць тому

      @@P.V.SIVARAMASASTRYSASTRY you can ping me on my LinkedIn

    • @supriyagembali9764
      @supriyagembali9764 Місяць тому

      💥💥

  • @sivaganeshatmakuri7635
    @sivaganeshatmakuri7635 Місяць тому

    Nice job guys

  • @hara128
    @hara128 Місяць тому

    this was very informative !!! #cfbr

  • @deshdeepakkant524
    @deshdeepakkant524 Місяць тому

    nice explaintion

  • @omkarkhairnar8567
    @omkarkhairnar8567 Місяць тому

    Great soln :)

  • @amitjain3216
    @amitjain3216 Місяць тому

    Can you explain the part where are mid + p[0] < p[1], still we accept it and went further with p[1]?? What if elements are like [1,5,9] and d=2, so p = 1 is not possible still according to our mathod it's true, why?? I know we need to look for bigger elements than this, but how can we apply binary search on such inconsistent data.

    • @U-DAY
      @U-DAY Місяць тому

      what is p here ?

    • @amitjain3216
      @amitjain3216 Місяць тому

      @@U-DAY sorry, p[0] I am referring here was array elements, and the another p in the example is our mid, for which we are checking whether it is acceptable min diff or not

    • @amitjain3216
      @amitjain3216 Місяць тому

      @@U-DAY bro, have you understood my question??

  • @rugvedshinde5418
    @rugvedshinde5418 Місяць тому

    great explanation . thankyou

    • @U-DAY
      @U-DAY Місяць тому

      Thank you ❤

  • @raveendragachchinamath7565
    @raveendragachchinamath7565 Місяць тому

    Great solution, we could reduce the search space from 10**10 to max(arr) + d for the high

    • @U-DAY
      @U-DAY Місяць тому

      @@raveendragachchinamath7565 yes that's right you can do that

  • @ashutoshverma1418
    @ashutoshverma1418 Місяць тому

    Best solution, Uday! THank you for sharing! But why you didn't use DP here? Because DP came as the first solution to my mind and I could not think of anything.

    • @U-DAY
      @U-DAY Місяць тому

      Yeah initially even I got the same idea . But with dp the time limit will be exceeded. So I actually tried to understand what am I exactly trying to achieve then I came up with this solution

    • @ashutoshverma7215
      @ashutoshverma7215 Місяць тому

      Yes it was giving TLE. Do we try DP and think of another solution if it doesn't work or there is way to know in advance if DP will give TLE?

    • @U-DAY
      @U-DAY Місяць тому

      Yeah you need to have a clear cut idea on the time complexities. Here even though you're using 1 state in this dp . For every state you need a for loop to jump directly to the next indices . Which will give you O(N^2) complexity

  • @andlisasa3
    @andlisasa3 Місяць тому

    you're a legend bro 🙏

    • @U-DAY
      @U-DAY Місяць тому

      Thank you bro.. ❤

  • @mayankshakya9200
    @mayankshakya9200 2 місяці тому

    Hey wanna ask like how can i reach expert from where to practice so that can come up with div2 C have been struggling a lot plz help

    • @U-DAY
      @U-DAY 2 місяці тому

      Just try to observe the difficulty rating of C problem and make sure that you practice roughly around 30 or above problems in that difficulty rating from practice section and learn the concepts and try to observe the patterns . It can help you eventually

  • @jk-sm6qr
    @jk-sm6qr 2 місяці тому

    Thanks man, Great explaination

    • @U-DAY
      @U-DAY 2 місяці тому

      Thank you ❤

  • @gokulsubramani7760
    @gokulsubramani7760 2 місяці тому

    How did you choose high?

    • @U-DAY
      @U-DAY 2 місяці тому

      start[i] range is from ( 0 to 10^9 ) d range is from ( 0 to 10 ^ 9 ) The min value you can get is 0 . The max value you can get is ( Max(start[i]) + Max(d) == 10^9 + 10^9 == 2*10^9 ) The max absolute diff is 2*10^9 So that's why i have taken high as 10^10

  • @keerthanaaduri
    @keerthanaaduri 2 місяці тому

    Nice explanation found got the intuition

    • @U-DAY
      @U-DAY 2 місяці тому

      Thank you ❤

  • @adityapandey5264
    @adityapandey5264 2 місяці тому

    Good explanation!

    • @U-DAY
      @U-DAY 2 місяці тому

      Thank you ❤

  • @vrushabhjoshi3155
    @vrushabhjoshi3155 2 місяці тому

    Nice Explanation Bro. You earned Subscriber here <3

    • @U-DAY
      @U-DAY 2 місяці тому

      Thank you bro 😄

  • @varshith3740
    @varshith3740 2 місяці тому

    very good explanation bro

  • @U-DAY
    @U-DAY 2 місяці тому

    The core logic remains the same, but eliminating constant time operations is necessary to fix the TLE. I’m sharing this code to provide better readability and clarity of my approach. Feel free to review it! #include <bits/stdc++.h> using namespace std; #define ll long long vector<ll> dijkstra_algo(ll st, vector<pair<ll, ll>>adj[], ll n) { priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>> >pq; vector<ll>vis(n, LONG_MAX); pq.push({0, st}); vis[st] = 0; while(!pq.empty()) { auto it = pq.top(); pq.pop(); ll x = it.first; ll y = it.second; for(auto i: adj[y]) { ll curr = x + i.second; if(curr < vis[i.first]) { vis[i.first] = curr; pq.push({curr, i.first}); } } } return vis; } int main() { ll m, n; cin>>n>>m; vector<pair<ll, ll>>adj[n]; vector<pair<ll, ll>>radj[n]; vector<vector<ll>>edges; for(int i=0; i<m; i++) { ll x, y, z; cin>>x>>y>>z; x--, y--; adj[x].push_back({y, z}); radj[y].push_back({x, z}); edges.push_back({x, y, z}); } vector<ll>vis1 = dijkstra_algo(0, adj, n); vector<ll>vis2 = dijkstra_algo(n-1, radj, n); ll ans = 1e18; for(auto it: edges) { ll curr = vis1[it[0]] + vis2[it[1]] + it[2]/2; ans = min(ans, curr); } cout<<ans<<endl; }

  • @Udaysingh0103
    @Udaysingh0103 2 місяці тому

    Best explanation of this question on Utube

    • @U-DAY
      @U-DAY 2 місяці тому

      Thank you ❤

  • @m.varunreddy7365
    @m.varunreddy7365 3 місяці тому

    nice explanation

  • @xyz1869
    @xyz1869 4 місяці тому

    nice explained 👌👌

  • @sauryakumargupta3008
    @sauryakumargupta3008 4 місяці тому

    Well explained <3, but why you initialize curr = 1 instead of 0?

    • @U-DAY
      @U-DAY 4 місяці тому

      curr is the sum that you need to find . 0 cannot be generated right and in the question we are asked to find the missing sum in the range 1 to n

  • @sainithinreddy6633
    @sainithinreddy6633 6 місяців тому

    Thanks bro its really help full

  • @whoamI-ht4op
    @whoamI-ht4op 8 місяців тому

    You explained sooo beautifully❤ excellent teaching skill

    • @U-DAY
      @U-DAY 8 місяців тому

      Thank you

  • @U-DAY
    @U-DAY 8 місяців тому

    Small Correction at Line 24 - (i < arr.size() ) not i < n. #include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<pair<int,int>>arr; for(int i=0; i<n; i++) { int start, end; cin>>start>>end; arr.push_back({start, 1}); arr.push_back({end, -1}); } sort(arr.begin(), arr.end()); long long prefix = 0; long long maxi = 0; for(int i=0; i<arr.size(); i++) { prefix += arr[i].second; maxi = max(maxi, prefix); } cout<<maxi<<endl; }

  • @varshith3740
    @varshith3740 8 місяців тому

    Your explanation is super bro, thanks a lot.....

  • @gurmansingh1878
    @gurmansingh1878 8 місяців тому

    Bro, great explanation .. Kudos!!!!

    • @U-DAY
      @U-DAY 8 місяців тому

      Thank you

  • @U-DAY
    @U-DAY 8 місяців тому

    either you can make curr += arr[i] or curr *= 2 . Both will give you the same because here (arr[i] == curr) both are equal. Even while you are adding a new coin, you will add the current searching coin . So it will be either (curr += curr or curr *= 2)