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: Interview Questions

Web Development – Application Server & Web Server (Quick Notes)

Dynamic content refers to website content that changes based on user input or other factors. This can include things like personalised recommendations or customised display.

Interview Questions, Networking, Web Development

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

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

Restaurant Rating Solution (Heap) | CodeChef [Medium]

Chef has opened up a new restaurant. He picks out the positive reviews and posts it on the website of the restaurant. A review is considered to be positive if it is among the top one-third of the total reviews when they are sorted by their rating.

Competitive Programming, Heaps, Interview Questions

Detect Loop in a Linked List | And Remove Loop

Given the head pointer of a linked list, check if there’s a loop in the linked list. Return true if there’s a loop.
Floyd’s Cycle-Finding Algorithm (Proof)

Interview Questions, Linked Lists

Minimum adjacent swaps required to sort Binary Array in O(n) | Amazon Interview Question

Given an array consisting of only 1s and 0s, sort this binary array such that all 0s are on the left and all 1s are on the right.

Arrays, Greedy approach, Interview Questions

Stock Buy Sell Maximum Profit Solution

The cost of a stock on each day is given in an array. Each day, you can either buy one share, sell any number of shares that you own, or not make any transaction at all.

Competitive Programming, Interview Questions

Lowest Common Ancestor in a Binary Tree in C++

The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants.

Interview Questions, Trees

Posts navigation

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