My first web page, I made in 2017 :D
This is a mapping from the syllabus of Grokking the Coding Interview to their respective Leetcode Problems Enjoy :)
3.4 Fast Slow Pointers 1 https://leetcode.com/problems/linked-list-cycle/ 8 https://leetcode.com/problems/reorder-list/
- View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
- View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
- HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
- String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DSU: | |
def __init__(self, n = 1000000000): | |
self.parent = [i for i in range(n)] | |
self.rank = [1] * n | |
def make_set(self,u): | |
self.parent[u] = u | |
self.rank[u] = 1 | |
def find_set(self,u): | |
if self.parent[u] == u: | |
return u |