Data Structures & Algorithms

Jump Search Algorithm In Java

Jump search algorithm is a pretty new algorithm to search for an element in a sorted array. The idea of…

1 year ago

Knuth Morris Pratt Pattern Search Algorithm

What is Knuth Morris Pratt or KMP algorithm ? KMP is an algorithm which is used in the applications of…

1 year ago

Binary Search Algorithm In Java

Binary Search is a Logarithmic search which finds the target element in a sorted array in O(logN) times compared to…

1 year ago

Leetcode Integer to Roman Java Solution

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100…

2 years ago

Leetcode Container With Most Water Java Solution

Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of…

2 years ago

Leetcode Binary Tree Level Order Traversal II Java Solution

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level…

2 years ago

Leetcode Unique Paths Java Solution

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only…

2 years ago

Leetcode Reconstruct Itinerary Java Solution

Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order.…

2 years ago

Leetcode Perfect Squares Java Solution

Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum…

2 years ago

Leetcode Regular Expression Matching Java Solution

Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. '.' Matches any single…

2 years ago

This website uses cookies.