Code with us
Code with us
  • Видео 42
  • Просмотров 3 350
Efficient Solution to Shortest Path Queries Using BFS | LeetCode Daily Challenge #3243
🔥 Welcome to another LeetCode Daily Challenge! 🔥
In this video, we tackle LeetCode Problem #3243:
👉 "Shortest Path Length After Each Query"
💡 Problem Summary:
We are given n cities connected by default roads from city
(i to i+1).
Additional roads are added dynamically through a series of queries.
After each query, we need to compute the shortest path from city 0 to city
n−1.
📈 Solution Highlights:
Graph Representation: Use an adjacency list for efficient updates.
Dynamic Updates: Add new roads after every query.
Shortest Path Calculation: Implement Breadth-First Search (BFS) to calculate the shortest path dynamically.
📂 Code Overview:
We start by building the default road network, then handle each qu...
Просмотров: 12

Видео

Solving the "Valid Sudoku" Problem | Efficient Approach Explained!
Просмотров 1887 часов назад
In this video, I tackle the popular *"Valid Sudoku" problem* from coding platforms like LeetCode. 🚀 We’ll explore how to determine whether a given 9x9 Sudoku board is valid based on the game’s rules. I’ll break down: - The *rules* of Sudoku validation for rows, columns, and sub-grids. - The step-by-step *algorithm* to solve the problem efficiently. - *Code walkthrough* with optimized techniques...
Maximum Matrix Sum - 1975 |LeetCode|
Просмотров 169 часов назад
Problem Description: LeetCode 1975 - Maximum Matrix Sum You are given a 2D integer matrix , and your task is to calculate the maximum possible sum of all its elements after applying the following operation any number of times : - Choose any single element in the matrix and flip its sign (i.e., change `-x` to `x` or `x` to `-x`). The goal is to find the largest sum achievable by optimally flippi...
Maximize Equal Rows After Flips ||Leetcode-1072||
Просмотров 1514 часов назад
This code solves the problem of maximizing the number of identical rows in a binary matrix after flipping columns. It utilizes a mapping technique to group rows based on their transformation patterns, where each row is converted into a unique string pattern representing whether its elements match the first element. By counting the occurrences of each pattern, the solution efficiently identifies...
"Word Search Solve in C++ | LeetCode Explained!"
Просмотров 1514 часов назад
Dive into the world of algorithms and data structures with this comprehensive video tutorial on solving the classic "Word Search" problem using backtracking in C . Learn how to implement an efficient solution step-by-step, explore the logic behind the recursive DFS approach, and understand how to handle edge cases effectively. Whether you're preparing for coding interviews or brushing up your p...
"Efficient Matrix Zeroing Algorithm in C++"
Просмотров 2116 часов назад
This is a C solution for the problem where we are given a matrix, and we need to set the entire row and column to zeros if any element in that row or column is zero. The solution does so in two passes through the matrix. Steps: Initial Setup: We define two vectors, row and col, to track which rows and columns need to be set to zero. Both vectors are initialized to zero, where each index corresp...
Median of Two Sorted Arrays - Optimal Solution
Просмотров 2421 день назад
In this tutorial, we'll dive deep into one of the classic coding problems: Finding the Median of Two Sorted Arrays. This is a challenging problem often encountered in technical interviews at top companies. We’ll break down the optimal solution step-by-step, focusing on achieving an efficient The median is a valuable measure of the middle value in a dataset. When dealing with two sorted arrays, ...
Efficient Two-Pointer Solution for Finding Target Sum Pairs in a Sorted Array | C++ Code Explained
Просмотров 31Месяц назад
In this video, I'll walk you through an efficient two-pointer approach to find a pair of numbers in a sorted array that adds up to a given target sum. This method uses a left and right pointer to avoid nested loops, significantly reducing time complexity. You'll see how each pointer adjusts based on the sum comparison, making this approach ideal for competitive programming and coding interviews...
Best Time to Buy and Sell Stock" Problem in C++ | LeetCode Solution
Просмотров 14Месяц назад
Welcome back to my channel! In today's video, we dive into a classic coding challenge: the "Best Time to Buy and Sell Stock" problem from LeetCode. 📈💰 🔍 Problem Overview: Given an array of prices where the index represents the day, our goal is to determine the maximum profit you can achieve by buying and selling a single share of stock. The trick is to find the optimal days to buy and sell to m...
How to Install Visual Studio Code in Just 5 minutes on Windows 11 | (2024) | (VS Code)
Просмотров 2154 месяца назад
*How to Install Visual Studio Code in 5 Minutes | Step-by-Step Guide* Welcome to our quick and easy tutorial on how to install Visual Studio Code (VS Code) in just 5 minutes! Whether you're new to coding or looking for a powerful, lightweight editor, VS Code is a great choice. In this video, we'll guide you through: 1. *Downloading VS Code:* We'll show you where and how to download the latest v...
Building calculator using HTML,CSS,Javascript | Code With Us
Просмотров 1144 месяца назад
Welcome to my channel! In this video, we explore the fundamentals of web development, focusing on what it entails and diving into the exciting world of frontend development. ✨ What You'll Learn: The basics of Calculator development and its importance in today’s digital landscape. Key components of frontend development, including HTML, CSS, and JavaScript. How frontend developers create visually...
Introduction to web development| code with us| part 3
Просмотров 884 месяца назад
Welcome to my channel! In this video, we explore the fundamentals of web development, focusing on what it entails and diving into the exciting world of frontend development. ✨ What You'll Learn: The basics of web development and its importance in today’s digital landscape. Key components of frontend development, including HTML, CSS, and JavaScript. How frontend developers create visually appeal...
Introduction to web development| Part-2
Просмотров 474 месяца назад
Hey everyone! 🌟 Welcome to my easy-to-follow HTML tutorial for absolute beginners! In this video, I'll guide you through the basics of HTML, show you how to set up your code in Visual Studio Code (VS Code), and run it on a live server. Whether you're just starting out or looking to refresh your skills, this tutorial is perfect for you! What You'll Learn: ✅ HTML basics and structure ✅ Setting up...
How to build a To-Do list website using HTML, CSS.| How to learn html for beginners
Просмотров 214 месяца назад
In this video, I'll guide you step-by-step on how to build a simple yet functional To-Do list website using HTML and CSS. Whether you're a beginner or looking to sharpen your web development skills, this tutorial will help you create a project you can proudly showcase. What's Covered in This Video: Setting up the basic HTML structure, including meta tags and linking to the CSS file. Creating a ...
Introduction to web development| code with us
Просмотров 794 месяца назад
Introduction to web development| code with us
How toCreate a Stunning Landing Page with HTML & CSS | Quick Tutorial | Responsive website
Просмотров 774 месяца назад
How toCreate a Stunning Landing Page with HTML & CSS | Quick Tutorial | Responsive website
How to Built Language Translation Android App? |codewithus
Просмотров 414 месяца назад
How to Built Language Translation Android App? |codewithus
"How to Build a Sticky Notes App in Android Studio | Java & XML Tutorial"
Просмотров 574 месяца назад
"How to Build a Sticky Notes App in Android Studio | Java & XML Tutorial"
How to Create a Calculator App in Android Studio Using Java
Просмотров 1564 месяца назад
How to Create a Calculator App in Android Studio Using Java
"Building an Alarm Clock App in Android Studio"
Просмотров 1394 месяца назад
"Building an Alarm Clock App in Android Studio"
"Build a Random Quote Generator App in Kotlin | Android Studio Tutorial | Coding with Us"
Просмотров 814 месяца назад
"Build a Random Quote Generator App in Kotlin | Android Studio Tutorial | Coding with Us"
Build a Quote of the Day App Using Java & XML | Coding with Us
Просмотров 1274 месяца назад
Build a Quote of the Day App Using Java & XML | Coding with Us
"How to Create a To-Do List App in Android Studio | Java & XML Tutorial"
Просмотров 1365 месяцев назад
"How to Create a To-Do List App in Android Studio | Java & XML Tutorial"
"Step-by-Step Guide to Making a Calculator Website | HTML, CSS, JavaScript"
Просмотров 5325 месяцев назад
"Step-by-Step Guide to Making a Calculator Website | HTML, CSS, JavaScript"
Drawing Hanuman Ji in Python | Code Art Tutorial
Просмотров 1296 месяцев назад
Drawing Hanuman Ji in Python | Code Art Tutorial
"THE INDIA FLAG THE PRIDE OF EVERYONE"
Просмотров 477 месяцев назад
"THE INDIA FLAG THE PRIDE OF EVERYONE"
"Structures in C++ Programming: Theory, Practice, and Beyond" ||Lecture-7||
Просмотров 557 месяцев назад
"Structures in C Programming: Theory, Practice, and Beyond" ||Lecture-7||
HEART by using Python code
Просмотров 897 месяцев назад
HEART by using Python code
Mastering Array Operations in C++: 5 Essential Challenges Solved!
Просмотров 157 месяцев назад
Mastering Array Operations in C : 5 Essential Challenges Solved!
Python Code for beautiful Scene
Просмотров 987 месяцев назад
Python Code for beautiful Scene

Комментарии

  • @AshishTiwari-xw3vw
    @AshishTiwari-xw3vw 6 дней назад

    Keep it up brother ❤

    • @codewithus1
      @codewithus1 6 дней назад

      @@AshishTiwari-xw3vw Thanks brother 😃

  • @ritugupta4640
    @ritugupta4640 4 месяца назад

    🎉🎉❤

  • @JyotiSingh-tn7bs
    @JyotiSingh-tn7bs 7 месяцев назад

    Jai Hind🇮🇳❤

    • @codewithus1
      @codewithus1 7 месяцев назад

      Jai Hind🇮🇳♥️

  • @codewithus1
    @codewithus1 7 месяцев назад

    Source Code from turtle import * import colorsys speed(0) bgcolor("black") h=0 for i in range(16): for j in range(18): c=colorsys.hsv_to_rgb(h,1,1) color(c) h+=0.005 rt(90) circle(150 - j * 6,90) lt(90) circle(150 - j * 6,90) rt(180) circle(40,24) done()

  • @AshishTiwari-xw3vw
    @AshishTiwari-xw3vw 7 месяцев назад

    Good bro

  • @pratham8876
    @pratham8876 7 месяцев назад

    Good initiative by you... Keep it up. And well done.😊

  • @ShubhamChowdhury-dm4qt
    @ShubhamChowdhury-dm4qt 7 месяцев назад

    ❤❤

  • @subhendugupta5844
    @subhendugupta5844 7 месяцев назад

    Well done bro ❤❤

  • @subhamyadav9808
    @subhamyadav9808 7 месяцев назад

    I appreciate that.