Backreferences in Java Regular Expressions

Backreferences in Java Regular Expressions is another important feature provided by Java.

To understand backreferences, we need to understand group first. Group in regular expression means treating multiple characters as a single unit. They are created by placing the characters to be grouped inside a set of parentheses – ”()”. Each set of parentheses corresponds to a group.

Read more

What Is Inner Interface in Java?

What is Inner Interface in Java?

Inner interface is also called nested interface, which means declare an interface inside of another interface. For example, the Entry interface is declared in the Map interface.

public interface Map {
	interface Entry{
		int getKey();
	}
 
	void clear();
}

Read more

Algorithm Problem Classification

An algorithm problem contains 3 parts: input, output and solution/algorithm. The input can be an array, string, matrix, tree, linked list, graph, etc. The algorithm solution can be dynamic programming, binary search, BFS, DFS, or topological sort. The solution can also be a data structure, such as a stack, queue/dequeue, hash set, tree set, hash … Read more