Skip to content
Theory of Coding

Theory of Coding

Search
  • Home
  • Data Structures
    • Graphs
      • Graph Theory Basics
      • Breadth First Search Algorithm
      • Snakes and Ladders Game Code
      • Depth First Search Algorithm
      • Bellman Ford Algorithm
      • Prim’s Algorithm
      • Dijkstra’s Algorithm
    • Trees
      • Binary Indexed Tree (or) Fenwick Tree
      • Trie Tree
      • Compressed Trie Tree
      • N-ary tree or K-way tree data structure
      • Segment Trees
      • Binary Heaps
      • Binary Heaps and Heapsort Algorithm
  • Algorithms
    • Searching & Sorting
      • Binary Search
      • Jump Search
      • Quick Sort
      • Merge Sort
    • Dynamic Programming
      • Introduction and Fibonacci Numbers
      • Kadane’s Algorithm
      • Edit Distance
    • Math
      • Modular Arithmetic Properties
  • AI
    • MiniMax Algorithm
    • Minimax algorithm with Alpha-Beta Pruning
    • Iterative Deepening Depth First Search
    • Bidirectional Search
  • Java
    • Language Basics
      • An Introduction
      • Data Types, Input and Operators
      • If Else, Switch and Loops
      • Strings, StringBuffer and StringBuilder
      • Arrays in Java
      • Enum and Methods in Java
    • Introduction to OOP
      • Java Tutorials – Classes and Objects
      • Encapsulation in Java
      • Constructor and Overloading Methods
      • Inheritance
Theory of Coding

Theory of Coding

Close menu
  • Home
  • Data Structures
    • Graphs
      • Graph Theory Basics
      • Breadth First Search Algorithm
      • Snakes and Ladders Game Code
      • Depth First Search Algorithm
      • Bellman Ford Algorithm
      • Prim’s Algorithm
      • Dijkstra’s Algorithm
    • Trees
      • Binary Indexed Tree (or) Fenwick Tree
      • Trie Tree
      • Compressed Trie Tree
      • N-ary tree or K-way tree data structure
      • Segment Trees
      • Binary Heaps
      • Binary Heaps and Heapsort Algorithm
  • Algorithms
    • Searching & Sorting
      • Binary Search
      • Jump Search
      • Quick Sort
      • Merge Sort
    • Dynamic Programming
      • Introduction and Fibonacci Numbers
      • Kadane’s Algorithm
      • Edit Distance
    • Math
      • Modular Arithmetic Properties
  • AI
    • MiniMax Algorithm
    • Minimax algorithm with Alpha-Beta Pruning
    • Iterative Deepening Depth First Search
    • Bidirectional Search
  • Java
    • Language Basics
      • An Introduction
      • Data Types, Input and Operators
      • If Else, Switch and Loops
      • Strings, StringBuffer and StringBuilder
      • Arrays in Java
      • Enum and Methods in Java
    • Introduction to OOP
      • Java Tutorials – Classes and Objects
      • Encapsulation in Java
      • Constructor and Overloading Methods
      • Inheritance
Theory of Coding

Theory of Coding

Search Toggle menu

Author: Vamsi

21 January 2018Artificial Intelligence

Bidirectional Search

Hello people! In this post we will talk about Bidirectional Search, a powerful search strategy which can be used if you have […]

14 January 2018Artificial Intelligence

Iterative Deepening Depth First Search (IDDFS)

Hello people! In this post we will talk about another search algorithm Iterative deepening depth first search (IDDFS) or Iterative deepening search […]

14 January 2018Tree Data Structures

N-ary tree or K-way tree data structure

N-ary tree is defined as a rooted tree which has at most N children for any node. So, a binary tree is a special case of the N-ary tree, where N = 2. We ca implement an N-ary tree using structures or using arrays.

31 December 20179 December 2023Array Interview Questions

Rotate matrix clockwise

Problem statement – Given an array of N rows and N columns (square matrix), rotate the matrix by 90° in clockwise direction. […]

31 December 2017Array Interview Questions

Print matrix in spiral order

Problem statement – Given a 2D array (or matrix) of N rows and M columns, print it in a spiral order. Example, […]

31 December 2017Array Interview Questions

Add one to digit array

Problem statement – Given a non-negative integer in the form of an array of digits, add one to digit array. The digits […]

31 December 2017Graph Theory

Adjacency List with String vertices using C++ STL

Hello people..! This is a special extension for my discussion on Graph Theory Basics. Here, I give you the code for implementing […]

24 December 2017Artificial Intelligence

Minimax algorithm with Alpha-Beta Pruning

Improve the performance of Minimax algorithm by applying Alpha-Beta Pruning. Alpha-beta pruning is based on the Branch and bound algorithm design paradigm where we discard any decision which cannot possibly yield a better solution than the one we have so far.

17 December 2017Array Interview Questions

First missing integer in an unsorted array

Problem statement – Given an unsorted integer array, find the first missing positive integer. Example, If A = [-1, 4, 2, 3, […]

17 December 2017Array Interview Questions

Maximum sum contiguous sub-array

Find a contiguous sub-array whose sum is maximum. Using the dynamic programming based Kadane’s Algorithm, we can solve this in O(N) time.

Posts pagination

1 2 … 5 >

Recent Posts

  • Bidirectional Search
  • Iterative Deepening Depth First Search (IDDFS)
  • N-ary tree or K-way tree data structure
  • Rotate matrix clockwise
  • Print matrix in spiral order

Categories

  • Array Interview Questions
  • Artificial Intelligence
  • C++ Tutorials
  • Competitive Coding
  • Dynamic Programming
  • Graph Theory
  • Heaps
  • Java
  • Math
  • Searching Algorithms
  • Sorting Algorithms
  • Tree Data Structures
© 2025 Theory of Coding. Proudly powered by Sydney