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

Custom Randomize | Generate Integers with Equal Probability

Given a function foo(), that returns an integer between 1 and 5 with equal probability. Write a function using foo() that returns an integer between 1 and 7.

Interview Questions, Mathematics

Reservoir Sampling

Reservoir sampling is a category of randomised algorithms for choosing a simple random sample, without replacement, of k items

Algorithms, Interview Questions, Mathematics

Master-Slave and Multi-Master Database Replication (Quick Notes)

Database replication is usually done to achieve HA (High Availability) and load-sharing purposes. A single member of group is designated as master for a given piece of data and is the only node allowed to modify data.

Databases, Interview Questions

Floyd-Warshall Algorithm Implementation | All pairs shortest path

Floyd-Warshall algorithm helps in finding the shortest path between all pairs of vertices in a graph.

Algorithms, Dynamic Programming, Graphs

Directed and Undirected Graphs (Implementation)

A graph consists of two sets, namely V (vertices) and E (Edges). V represents a non-empty sets of vertices present in the graph. While E, represents the set of edges (joining two vertices) in the graph.

Graphs

Mixins | Diamond Problem

Mixins help avoid problem caused by multiple inheritance namely, Diamond Problem. Diamond problem is the reason why Java doesn’t support multiple inheritance.

Interview Questions, Java

Java Notes | Singleton vs Static Class

When Java encounters a call to a method that is found within the object it is treated as a call to that object’s method.

Java

Java Notes | Interface vs Abstract class

Methods and members of an abstract class can have any visibility (public, protected or public), while all methods of an interface must be public.

Java

Binary Search Time Complexity Analysis

Since, at each step the size of the (searchable) array is reduced to half (1/2), we could write the following recurrence relation for the Binary Search Algorithm

Algorithms, Divide and Conquer

Binary Search Explained | LeetCode Solution

Binary Search is a divide and conquer algorithm that finds a particular element within a sorted array or a given integer range.

Algorithms, Competitive Programming, Divide and Conquer

Posts pagination

< 1 … 8 9 10 … 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