Skip to content

Only Code

Eat Code Sleep – repeat

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

Category: Hashmaps

Valid Anagram – LeetCode Solution in O(n) [Easy]

Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase

Competitive Programming, Hashmaps

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

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

Anagram | HackerRank Solution | Anagram Algorithm

Two words are anagrams of one another if their letters can be rearranged to form the other word. Given a string, split it into two contiguous substrings of equal length. Determine the minimum number of characters to change to make the two substrings into anagrams of one another.

Competitive Programming, Hashmaps

Count of Maximum Solution

Given an array A of length N, your task is to find the element which repeats in A maximum number of times as well as the corresponding count.

Arrays, Competitive Programming, Hashmaps

Find number of subarrays with given sum (with Negative numbers) – LeetCode Solution [Medium]

In the previous post, we discussed about finding the total number of continuous subarrays of a given array (of non-negative numbers) whose sum equals to k. In this post we’ll include negative numbers in the given array arr.

Arrays, Hashmaps
  • Algorithms
  • Arrays
  • Backtracking & Recursion
  • Breadth First Search (BFS)
  • C/C++
  • Competitive Programming
  • Databases
  • Depth First Search (DFS)
  • Divide and Conquer
  • Dynamic Programming
  • Graphs
  • Greedy approach
  • Hashmaps
  • Heaps
  • Interview Questions
  • Java
  • Linked Lists
  • Machine Learning
  • Mathematics
  • Networking
  • Python
  • Queues
  • Sorting
  • Special Data Structures
  • Stacks
  • Trees
  • Web Development
© 2023 Only Code.