Back to home
SHOWCASE / PROBLEM SOLVING PORTFOLIO

LEETCODE PROFILE

@naru1611

ALGORITHMIC MASTERIES & SCHEMAS

Showcasing Narendra's implementations and optimized competitive programming code.

CONCEPT / 01

Dynamic Programming

Optimizing overlapping subproblems using memoization and tabular models. Mastered grid-paths, knapsacks, and sequence-alignment constraints.

Core Problems: Edit Distance (Levenshtein), LCS, Knapsack DP
// Finding Edit Distance (Min operations to align strings)
int solve(String s1, String s2) {
    int m = s1.length(), n = s2.length();
    int[][] dp = new int[m + 1][n + 1];
    for(int i = 0; i <= m; i++) dp[i][0] = i;
    for(int j = 0; j <= n; j++) dp[0][j] = j;
    ...
    return dp[m][n];
}
CONCEPT / 02

Graph Theory & Trees

Traversing structures and finding short paths. Experienced with Dijkstra, topological ordering, disjoint sets, and tree hierarchies.

Core Problems: Course Schedule, Network Delay, Redundant Connection
// Disjoint Set Union (Find/Union with Path Compression)
class DSU {
    int[] parent, rank;
    int find(int i) {
        if (parent[i] == i) return i;
        return parent[i] = find(parent[i]); // compress
    }
    void union(int i, int j) { ... }
}
CONCEPT / 03

Advanced Data Structures

Designing indexing and lookup trees. Expert in Trie structures for prefix matching and Segment Trees for range operations.

Core Problems: Design Add & Search Words, Range Sum Query
// Trie Node prefix parsing
class TrieNode {
    TrieNode[] children = new TrieNode[26];
    boolean isEnd = false;
    void insert(String word) {
        TrieNode curr = this;
        for(char c : word.toCharArray()) { ... }
    }
}