Skip to content

Only Code

Eat Code Sleep – repeat

  • Apps
  • 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
  • Apps
  • 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

Array Manipulation | HackerRank Solution [Hard]

Starting with a 1-indexed array of zeros and a list of operations, for each operation add a value to each the array element between two given indices, inclusive. Once all operations have been performed, return the maximum value in the array.

Arrays, Competitive Programming, Sorting

Palindrome Index | HackerRank Solution [Easy]

Given a string of lowercase letters in the range ascii[a-z], determine the index of a character that can be removed to make the string a palindrome

Competitive Programming, Greedy approach

Sherlock and MiniMax | HackerRank Solution [Hard]

Given an integer range, for all M in that inclusive range, determine the minimum – abs(arr[i]-M) for all i

Arrays, Competitive Programming, Mathematics

Sherlock and Array | HackerRank Solution [Easy]

Challenge is to find an element of the array such that the sum of all elements to the left is equal to the sum of all elements to the right

Arrays

PacMan – DFS | HackerRank Solution [Easy]

Print all the nodes that you encounter while printing DFS tree. Then, print the distance ‘D’ between the source ‘P’ and the destination ‘.’

Competitive Programming, Depth First Search (DFS)

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

Posts pagination

< 1 … 11 12 13 … 23 >
  • 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
Only Code | Aureolls