Skip to content

Only Code

Eat Code Sleep – repeat

  • Github
  • Home
  • Arrays
  • Linked Lists
  • Trees
  • Stacks
  • Queues
  • Heaps
  • Graphs
  • Algorithms+
    • Sorting
    • Dynamic Programming
    • Divide and Conquer
    • Backtracking & Recursion
    • Greedy approach
    • Breadth First Search (BFS)
    • Depth First Search (DFS)

Only Code

Eat Code Sleep – repeat

Close menu
  • Github
  • Home
  • Arrays
  • Linked Lists
  • Trees
  • Stacks
  • Queues
  • Heaps
  • Graphs
  • Algorithms+
    • Sorting
    • Dynamic Programming
    • Divide and Conquer
    • Backtracking & Recursion
    • Greedy approach
    • Breadth First Search (BFS)
    • Depth First Search (DFS)

Only Code

Eat Code Sleep – repeat

Search Toggle menu

Author: Logan

Reverse Shuffle Merge | HackerRank Solution [Advanced]

Given a string s such that, s ∈ merge(reverse(A), shuffle(A)) for some string A, find the lexicographically smallest A

Competitive Programming

map vs unordered_map in C++ Standard Template Library (STL)

Internally, the elements in the unordered_map are not sorted in any particular order with respect to either their key or values (unlike map)

C/C++, Hashmaps

nCr table | HackerRank Solution [Medium]

Jim is doing his discrete maths homework which requires him to repeatedly calculate nCr(n choose r) for different values of n

Dynamic Programming, Mathematics

Max Min | HackerRank Solution [Medium]

Given a list of integers, arr, and a single integer k. Create an array of size k from elements of arr such that its unfairness is minimum

Arrays

Common Child | Algorithms | HackerRank Solution [Medium]

Given two strings p and q of equal length, what’s the longest string that can be constructed such that it is a child of both?

Dynamic Programming

Generate Parentheses – LeetCode Solution [Medium]

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

Competitive Programming

Sum of Left Leaves in Binary tree – LeetCode Solution [Easy]

Given the root of a binary tree, return the sum of all left leaves. Number of nodes in the tree lie in the range – [1, 1000]

Trees

Counting Bits O(n) Solution – LeetCode [Easy] | Brian Kernighan’s Algorithm

Given an integer n, return an array ans of length n + 1 such that for each i (0

Algorithms, Competitive Programming, Mathematics

Longest Substring Without Repeating Characters – LeetCode Solution [Medium]

Given a string s, consisting of English letters, symbols and spaces, find the length of the longest substring without repeating characters.

Competitive Programming, Hashmaps

Lowest Common Ancestor of a Binary Search Tree – LeetCode Solution [Easy]

The lowest common ancestor is defined between two nodes p and q as the lowest node in Tre that has both p and q as descendants.

Trees

Posts pagination

< 1 … 12 13 14 … 24 >
  • Algorithms
  • Arrays
  • Backtracking & Recursion
  • Breadth First Search (BFS)
  • C/C++
  • Competitive Programming
  • Computer Science
  • Data Science
  • Databases
  • Depth First Search (DFS)
  • Divide and Conquer
  • Dynamic Programming
  • Graphs
  • Greedy approach
  • Hashmaps
  • Heaps
  • Interview Questions
  • Java
  • Linked Lists
  • Machine Coding Questions
  • Machine Learning
  • Mathematics
  • Networking
  • Programming Projects
  • Python
  • Queues
  • Sorting
  • Special Data Structures
  • Stacks
  • Trees
  • Web Development
© 2025 Only Code | Aureolls
Exit mobile version