Skip to content

Instantly share code, notes, and snippets.

View drewdev02's full-sized avatar
🎯
Focusing

Andrew Rodriguez drewdev02

🎯
Focusing
  • Havana
View GitHub Profile
package com.thealgorithms.datastructures.trees;
import java.util.LinkedList;
import java.util.Queue;
/**
* This entire class is used to build a Binary Tree data structure. There is the
* Node Class and the Tree Class, both explained below.
*/
/**
package com.thealgorithms.datastructures.lists;
public class CircleLinkedList<E> {
private static class Node<E> {
Node<E> next;
E value;
private Node(E value, Node<E> next) {
package com.thealgorithms.datastructures.lists;
import java.util.ArrayList;
import java.util.List;
/**
* @author https://github.com/shellhub
*/
public class MergeSortedArrayList {
package com.thealgorithms.others;
import java.util.Scanner;
/**
* Fibonacci sequence, and characterized by the fact that every number after the
* first two is the sum of the two preceding ones.
*
* <p>
* Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21,...
package com.thealgorithms.others;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
/**
* Creates a random password from ASCII letters Given password length bounds
*
package com.thealgorithms.sorts;
import static com.thealgorithms.sorts.SortUtils.less;
/**
* Generic merge sort algorithm.
*
* @see SortAlgorithm
*/
class MergeSort implements SortAlgorithm {
package com.thealgorithms.strings;
/**
* Wikipedia: https://en.wikipedia.org/wiki/Palindrome
*/
class Palindrome {
/**
* Check if a string is palindrome string or not using String Builder
*
package com.thealgorithms.others;
import java.util.Scanner;
/**
* Fibonacci sequence, and characterized by the fact that every number after the
* first two is the sum of the two preceding ones.
*
* <p>
* Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21,...
package com.thealgorithms.others;
import java.util.*;
/**
* Dijkstra's algorithm,is a graph search algorithm that solves the
* single-source shortest path problem for a graph with nonnegative edge path
* costs, producing a shortest path tree.
*
* <p>
* NOTE: The inputs to Dijkstra's algorithm are a directed and weighted graph
package com.thealgorithms.others;
public class CountChar {
/**
* Count non space character in string
*
* @param str String to count the characters
* @return number of character in the specified string
*/