Skip to content

Instantly share code, notes, and snippets.

View its-prithvi-raj's full-sized avatar
🎯
Focusing

Prithvi its-prithvi-raj

🎯
Focusing
View GitHub Profile

WSL2 settings

.wslconfig (%USERPROFILE%)

[wsl2]
firewall = true

[wsl2]
@its-prithvi-raj
its-prithvi-raj / settings.json
Last active January 23, 2026 12:44
Visual Studio Code Settings
{
// "cmake.pinnedCommands": [
// "workbench.action.tasks.configureTaskRunner",
// "workbench.action.tasks.runTask"
// ],
// "C_Cpp.intelliSenseEngine": "disabled",
// "C_Cpp.formatting": "clangFormat",
// "C_Cpp.autocompleteAddParentheses": true,
// "C_Cpp.inlayHints.autoDeclarationTypes.enabled": true,
// "C_Cpp.inlayHints.autoDeclarationTypes.showOnLeft": true,
@its-prithvi-raj
its-prithvi-raj / Terminal_Colour_Schemes.json
Last active February 6, 2025 08:03
Windows Terminal Colour Schemes
"schemes":
[
{
"background": "#D5CCBA",
"black": "#20111B",
"blue": "#426A79",
"brightBlack": "#5E5252",
"brightBlue": "#426A79",
"brightCyan": "#989A9C",
"brightGreen": "#858162",
@its-prithvi-raj
its-prithvi-raj / cpp_brushup.md
Last active January 28, 2025 14:10
C++ Important Stuff Brush-up

Pointers Cheatsheet

int a = 100;
int* ptr = &a;

// Value of a.
std::cout << "(Value of) a: " << a << "\n";

// Pointer to a OR value of a.

$$ O(1) < O(\log n) < O(n) < O(n \log n) < O(n^2) < O(n^3) < O(2^n) < O(n!) $$


  • Constant Time $$O(1)$$: The algorithm's execution time remains constant regardless of the input size. This is the most efficient time complexity. Example: accessing an element in an array by index.
  • Logarithmic Time $$O(\log n)$$: The algorithm's execution time increases logarithmically with the input size. This is often associated with algorithms that divide the input in half at each step, like binary search. Example: binary search in a sorted array.
  • Linear Time $$O(n)$$: The algorithm's execution time increases linearly with the input size. This is common for algorithms that need to process each element of the input once, like searching for a specific element in an unsorted array. Example: iterating through an array.
  • Linearithmic Time $$O(n \log n)$$: The algorithm's execution time grows slightly faster than linear time. This complexity is typically associated with efficient sorting algorithms like m
@its-prithvi-raj
its-prithvi-raj / System Design.md
Created August 27, 2024 01:28 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?