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

Author: Himanshu

Understanding P, NP, and NP-Complete

This so-called P ≠ NP question has been one of the deepest, most perplexing open research problems in theoretical computer science.

Algorithms

Why is a Bipartite graph with an odd number of vertices a Non-Hamiltonian graph?

A Hamiltonian cycle, also known as a Hamilton cycle or Hamiltonian circuit, is a cycle in a graph that visits every vertex exactly once, except for the starting vertex.

Graphs

Knuth-Morris-Pratt (KMP) | String Searching Algorithm

The KMP algorithm improves the efficiency of string searching by utilizing the information gathered from previous character comparisons. It avoids unnecessary character comparisons by exploiting the knowledge of the pattern itself.

Algorithms

Permutations of a string

Each of these permutations represents a unique arrangement of the elements. Total number of permutations of a set will always be n!

Algorithms, Backtracking & Recursion

Understanding Prim’s Algorithm for Minimum Spanning Tree in C++

Prim’s Algorithm is a popular greedy algorithm used to find the Minimum Spanning Tree (MST) of a connected, weighted graph.

Algorithms, Graphs, Greedy approach

Minimum Spanning Tree (MST) | Kruskal’s Algorithm in C++

Kruskal’s algorithm is one of the popular algorithms used to find an MST in a connected weighted graph. This algorithm is efficient, easy to understand, and guarantees the construction of a minimum-weight spanning tree.

Algorithms, Graphs, Greedy approach

Bellman-Ford Algorithm | Single source shortest path

This algorithm uses Relaxation, to find the shortest path between the source vertex and other vertices. It gradually expands the search space until the shortest path to the destination node is found.

Algorithms, Dynamic Programming, Graphs

Dijkstra’s Algorithm | Single source shortest path

Dijkstra’s algorithm works based on the principle of Greedy-approach, gradually expanding the search space until the shortest path to the destination node is found.

Algorithms, Graphs, Greedy approach

Nim’s Game | Code Implementation

Nim’s game is played with a set of heaps, each containing a certain number of objects or stones. Two players take turns removing objects from the heaps

Competitive Programming, Mathematics

Order Statistics | Selection Algorithm

“Order Statistics” is a concept discussed in the book “Introduction to Algorithms”. It pertains to finding the ith order statistics of a set of n elements in linear time. ith order statistics is the ith smallest element in a set of n elements.

Algorithms, Interview Questions, Mathematics

Posts navigation

1 2 … 18 >
  • 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.