Skip to content
Code & Colors
  • System Design
  • DSA
    • Data Structures & Algorithms (DSA)
    • DSA Practice Questions
  • Frameworks
    • Laravel
    • Spring Boot
  • Code Quality
    • Coding Conventions
    • Design Patterns
  • Interview
    • Interview Questions
  • Path to Financial Freedom

Data Structures

Binary Search

Posted by By codencolors September 23, 2022Posted inAlgorithms, Data StructuresNo Comments
public class BinarySearch { static int search(int arr[], int el) { int l = 0; int h = arr.length - 1; while(l <= h){ int mid = (l + h)…
Read More

Linear Search

Posted by By codencolors September 23, 2022Posted inData Structures, Algorithms, UncategorizedNo Comments
public class LinearSearch { static int search(int arr[], int el) { for (int i = 0; i < arr.length; i++) { if (arr[i] == el) { return i + 1;…
Read More

Recursion

Posted by By codencolors September 22, 2022Posted inData Structures, AlgorithmsNo Comments
When a function calls itself it is known as recursion. Program to find factorial of no using recursion public class FactorialUsingRecursion { public static void main(String[] args) { System.out.println(fact(5)); }…
Read More

Trees

Posted by By codencolors September 21, 2022Posted inData StructuresNo Comments
A tree is a non-linear Data structure where is data is stored in the form of tree node. Types of trees Binary Tree A binary tree a node can have…
Read More

Time Complexities Table

Posted by By codencolors September 21, 2022Posted inData Structures, AlgorithmsNo Comments
Here is a list of some of the common time complexities. Time ComplexitiesNameExampleO(1)Constant- Accessing an element of an array- Adding element at beginning of a linked listO(log n)Logarithmic- Finding an…
Read More

Implementing Queue using Arrays

Posted by By codencolors September 20, 2022Posted inData Structures, Algorithms, ProgramsNo Comments
public class Queue { private int front, rear, capacity; private int[] queue; Queue(int size) { this.front = 0; this.rear = 0; this.capacity = size; this.queue = new int[capacity]; } void…
Read More

Arrays Questions

Posted by By Vikas Rana September 20, 2022Posted inInterview Question, Data StructuresNo Comments
Array Questions Write a program to find maximum and minimum element in an integer array.Write a program to add all the elements of the array.Program to find whether the given…
Read More

Differences between Recursion Vs Iteration

Posted by By codencolors September 18, 2022Posted inData StructuresNo Comments
Recursion Terminates when a base case is reachedEach call requires extra space in stack frameFor infinte recursion, program may run out of memorySolutions are easily to formulate recursively Iteration Terminates…
Read More

How to Compare Algorithms

Posted by By codencolors September 18, 2022Posted inData Structures, AlgorithmsNo Comments
We can compare algorithms based on the following method Execution Time We can compare algorithm based on the time it takes to execute some input. But the thing is the…
Read More

Importance of Analysis of Algorithm

Posted by By codencolors September 18, 2022Posted inData StructuresNo Comments
Algorithm analysis helps us determine the efficiency of the algorithm with respect to the time and space it uses. Let's understand it with an example Suppose you want to transfer…
Read More

Posts navigation

1 2 Next page

Recent Posts

  • Java streams question on map and filter
  • What is JPA?
  • Spring boot series
  • Spring boot questions
  • Printing all the loaded beans in Springboot

Recent Comments

No comments to show.

Archives

  • September 2022
  • August 2022
  • July 2022

Categories

  • Algorithms
  • Code Quality
  • Data Structures
  • Design Patterns
  • Interview Question
  • Java
  • Java 8
  • Laravel
  • Programs
  • Software Engineering
  • SQL
  • System Design
  • Uncategorized

If you found something incorrect in the content please suggest updates in the comment section.

About Us

The purpose of this website is to collect notes while preparing for our technical interview. We will be compiling quick notes and exercises for future reference

Please use this website at your own risk. Notes have been collected from different sources. If you encountered issues please comment on the post.

  • Java
  • Data Structures & Algorithms
  • System Design
  • Dictionary
2023 — Code & Colors
Scroll to Top