Relative Sort Array
Relative Sort Array (LeetCode 1122): sort by the order defined in a second array, with the rest sorted ascending. O(n log n), Python/Java/C++.
Search Java, Python, SQL, DSA, Web Development and more. Every topic broken into short, readable pages.
Pick a subject and follow it from the basics to the advanced material.
Core Java, object oriented programming, collections, multithreading and JDBC.
100 notesA complete core Python path: syntax, data types, operators, strings, control flo...
110 notesA complete HTML path: document structure, text, links, media, tables, forms, sem...
113 notesCSS styling, the box model, flexbox, grid and responsive design.
92 notesA complete SQL path: fundamentals, DDL and DML, querying, joins, subqueries, CTE...
91 notesA complete DBMS path: database fundamentals, architecture, data models, the ER m...
59 notesProcesses, scheduling, memory management, deadlocks and file systems.
51 notesThe OSI model, TCP/IP, routing, and application layer protocols.
122 notesArrays, Strings, Sliding Window, Two Pointers, Searching & Binary Search, Sortin...
180 notesData Analytics interview questions and answers covering Excel, SQL, Python, stat...
40 notesFreshly published material.
Relative Sort Array (LeetCode 1122): sort by the order defined in a second array, with the rest sorted ascending. O(n log n), Python/Java/C++.
Wiggle Sort II (LeetCode 324): strict nums[0] < nums[1] > nums[2]... via sorting and interleaving the two halves in reverse. O(n log n), Python/Java/C...
H-Index (LeetCode 274) via sorting: sort citations descending and find the largest i where citations[i] >= i+1. O(n log n), Python/Java/C++.
Meeting Rooms (LeetCode 252): sort meetings by start and check that none overlaps the previous one. O(n log n), Python/Java/C++.
Kth Largest Element (LeetCode 215) via sorting: sort and index from the end in O(n log n), with a note on the O(n)-average quickselect alternative.
Hand picked topics worth starting with.
Reading the traceback, forming a hypothesis and checking it. The debugger is a tool; the method is what actually finds the bug.
Code is read far more often than it is written. Consistent style, honest names and clear structure are what make the second reading cheap.
Annotations describe what a function expects and returns. Python does not enforce them, and that is the point: they are documentation a tool can check...
Big-O describes how work grows with input size. Choosing the right container is worth more than every micro-optimisation combined.
What other readers are reading most.
A package is a directory of modules. __init__.py marks it and defines its public face, and relative imports let modules inside it find each other.
Python resolves a name by looking in four places in a fixed order: local, enclosing, global, built-in. Assignment anywhere in a function makes the nam...
pathlib turns file paths into objects with methods. It replaces string joining and most of os.path, and it works the same on Windows, macOS and Linux.
The two constraints that give a database its structure: one that identifies a row, and one that guarantees a reference points at something real.
ul when the order does not matter, ol when it does. Plus the start, reversed, type and value attributes that most people never discover.
Official documentation and practice sites worth bookmarking.
Official Oracle documentation for the Java platform.
Python DocumentationOfficial documentation for Python 3.
MDN Web DocsReference for HTML, CSS and JavaScript.
MySQL Reference ManualComplete MySQL server reference documentation.
GitHubHost and explore open source repositories.
LeetCodePractice coding problems for interviews.
W3C StandardsOfficial web platform standards.
VisualgoVisualise data structures and algorithms in action.
Create a free account to bookmark notes, write private notes and organise them into folders.