code-resources
    • cmu lectures
    • notes
    • css-snippets
    • notes
    • notes
    • Intro to Databases
      • MongoDB Cheatsheet
      • Basic SQL Commands
    • Docker
    • notes
    • Interview Checklist
        • Explain CSS Position Property
        • How to Center a Div with CSS?
        • What are pseudo-classes and pseudo-elements?
        • What Are the Values of Display in CSS? What Is the Difference Between inline, block and inline-block? What Is the Difference Between display:none and visibility:hidden?
        • What is StyleX? What Problems Does It Solve? When Should You Use It?
        • What is the CSS Box Model?
        • What is the specificity of CSS selectors
        • What units are there in CSS? How do I use them?
        • How to Use Browser DevTools to Debug Performance Issues
        • What are Reflow and Repaint? How to optimize?
        • What is debounce? How to implement debounce function
        • What Is a Monorepo? Why Using a Monorepo?
        • What is Bun? Why Use It? How Does It Solve Node.js Problems?
        • What Is JavaScript Modules?
        • What Is Vite? Why Use Vite? What Problems Does It Solve?
        • What Is Webpack Loader And Plugin?
        • Why pnpm is Faster and More Space-Efficient than npm?
        • Explain the Difference Between DOMContentLoaded, load, beforeunload and unload
        • Explain the Difference Between <script async> and <script defer>
        • What Is Semantic HTML?
        • Where Should the <script> Tags Be Placed in HTML? How About <link> Tags?
        • Front-end image format selection, when should I use JPG, PNG, WebP or SVG?
        • What Is SPA (Single-Page Application)? What Are Its Advantages and Disadvantages?
    • Stages of an Interview
    • index
      • Additional Concepts
      • Concurrency and Asynchronous JavaScript
      • Control Flow and Loops
      • Data Structures
      • Event handling
      • Functional Programming Principles
      • Functions and Scope
      • JavaScript Basics
      • JavaScript Modules and Import/Export
      • Memory Management
      • Objects and Prototypes
      • Special Functionality
      • Testing
        • How to find the average of an array in JavaScript?
        • How to Flatten an Array?
        • How to remove duplicates from an array?
        • What array traversal methods are there in JavaScript? (for loop, for...in, for...of, forEach, map, filter, every, some)
        • Will passing (a,b) => b - a in JavaScript builit-in sort a be in ascending or descending order? Why?
        • 10 JavaScript Quizs to Test Your Knowledge of This Language
        • 9 Key New Features of ES6 (ES2015) You Should Know
        • Should You Use the Ternary Operator in Programming?
        • What Are the Primitive Types in JavaScript? How To Check the Type of a Variable?
        • What is ECMAScript? What is it to do with JavaScript?
        • What Is the Difference Between ==, === and Object.is in JavaScript?
        • What is the Difference Between Map and Object in JavaScript, and Why Do We Need Map?
        • What is the difference between null, undefined and undeclared in JavaScript?
        • What Is the Difference Between Set, Map, WeakSet, and WeakMap in JavaScript?
        • What Is the Purpose of "use strict" in JavaScript and What Are the Benefits of Using It?
        • What’s New in ES2023 (ES14)?
        • What Will 0.1 + 0.2 Be in JavaScript? Why?
        • The Most Common JavaScript Event Loop Interview Questions
        • What are async/await in JavaScript and how do they differ from promises?
        • What Is an Event Loop in JavaScript?
        • What Is JavaScript Promise? And How To Use It?
        • What is Promise.all? How to implement it?
        • What is Promise.race? How to implement it?
        • What Is a Higher-Order Function in JavaScript?
        • What Is an Arrow Function in JavaScript? How Is It Different From a Regular Function?
        • What is an IIFE (Immediately Invoked Function Expression) in JavaScript? What are the Pros and Cons?
        • Explaining the Concept of a Class in ES6 and the Distinction Between a Function Constructor
        • The most common JavaScript prototype interview questions and answers (prototype, prototypal inheritance, prototype chain)
        • What Is "this" in JavaScript?
        • When Is the Difference Between Shallow and Deep Copy in JavaScript?
        • Why structuredClone is the Best Choice for Deep Copying in JavaScript?
        • Explain What Hoisting Is in JavaScript
        • What is JavaScript Closures?
        • What Is the Difference Between var, let and const in JavaScript?
        • What Is the Scope and Scope Chain of JavaScript?
        • 1-arrays
        • 2-linked-lists
        • 3-tries
        • 4-heaps
        • 5-backtracking
        • 6-graphs
        • Dynamic Programming
      • algorithms templates
          • C
          • 03-static-arrays
          • Java
          • JavaScript
          • Python
          • C
          • 04-dynamic-arrays
          • Java
          • JavaScript
          • Python
          • C
          • 05-stacks
          • Java
          • JavaScript
          • Python
        • 02-arrays
          • C
          • 06-singly-linked-lists
          • Java
          • JavaScript
          • Python
          • C
          • 07-doubly-linked-lists
          • Java
          • JavaScript
          • Python
          • C
          • 08-queues
          • Java
          • JavaScript
          • Python
        • 03-linked-lists
          • C
          • 09-factorial
          • Java
          • JavaScript
          • Python
          • C
          • 10-fibonacci
          • Java
          • JavaScript
          • Python
        • 04-recursion
          • C
          • 11-insertion-sort
          • Java
          • JavaScript
          • Python
          • C
          • 12-merge-sort
          • Java
          • JavaScript
          • Python
          • C
          • 13-quick-sort
          • Java
          • JavaScript
          • Python
          • C
          • 14-bucket-sort
          • Java
          • JavaScript
          • Python
        • 05-sorting
          • C
          • 15-search-array
          • Java
          • JavaScript
          • Python
        • 06-binary-search
          • C
          • 18-binary-search-trees
          • Java
          • JavaScript
          • Python
          • C
          • 19-bst-insert-and-remove
          • Java
          • JavaScript
          • Python
          • C
          • 20-depth-first-search
          • Java
          • JavaScript
          • Python
          • C
          • 21-breadth-first-search
          • Java
          • JavaScript
          • Python
        • 07-trees
          • C
          • 23-tree-maze
          • Java
          • JavaScript
          • Python
        • 08-backtracking
          • C
          • 25-push-and-pop
          • Java
          • JavaScript
          • Python
          • C
          • 26-heapify
          • Java
          • JavaScript
          • Python
        • 09-heap-priority-queue
          • C
          • 27-hash-usage
          • Java
          • JavaScript
          • Python
          • C
          • 28-hash-implementation
          • Java
          • JavaScript
          • Python
        • 10-hashing
          • C
          • 30-matrix-dfs
          • Java
          • JavaScript
          • Python
          • 31-matrix-bfs
          • JavaScript
          • Python
          • 32-adjacency-list
          • JavaScript
          • Python
        • 11-graphs
          • C
          • 33-1-dimension-dp
          • Java
          • JavaScript
          • Python
          • C
          • 34-2-dimension-dp
          • Java
          • JavaScript
          • Python
        • 12-dynamic-programming
          • C
          • 35-bit-operator
          • Java
          • JavaScript
          • Python
        • 13-bit-manipulation
      • data structures and algorithms templates
      • Dynamic Programming Patterns
      • General Patterns
      • Leetcode Patterns
    • Leetcode
      • Interview Cheatsheet
    • notes
    • Node.js Syntax
    • Python Basics
    • Frameworks
    • index
    • Python Syntax
    • notes
    • react-snippets
    • React Testing Library
    • react with typescript
        • Why Do We Need to Add Keys When Rendering Lists in React?
        • Why Use Immutable Syntax When Updating React State?
        • Explain the Lifecycle of a React Component
        • What Is a Pure Function? Why Do React Function Components Need to Be Pure?
        • What Is JSX?
        • What is Virtual DOM?
        • What Is React Hook?
        • What Is useEffect? What Is the Difference Between useEffect and useLayoutEffect?
        • Why Do We Need To Call React Hook at the Top Level? Why Can’t We Call It Inside a Loop or Condition?
    • notes
    • notes
      • Caching
      • Databases
      • notes
      • Load balancer
      • Scaling
    • System Design for Beginners
    • What happens when you type google.com into your browser's address box and press enter?
    • notes
    • VSCode Shortcuts
    • notes
        • Beyond localStorage, Understanding IndexedDB in Modern Browsers
        • What Is Event Delegation, Capturing, and Bubbling in a Browser?
        • What Is the Difference Between Cookie, sessionStorage and localStorage?
        • How Does the HTTP Caching Mechanism Work?
        • What Is CORS? Why Using CORS?
        • What Is the Difference Between HTTP/1, HTTP/1.1 and HTTP/2?
        • Differences between Encryption, Encoding, and Hashing
        • What Is CSRF?
        • What Is SQL Injection?
        • What is XSS?
    • http
    • Performance
    • Security
leetcodealgorithms-templates6-graphs2-code

c java javascript python

https://leetcode.com/problems/min-cost-to-connect-all-points/ https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/

Python3-code