Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list's nodes,…
Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together…
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if:…
Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list:…
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer…
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain…
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may…
Suppose you have a random list of people standing in a queue. Each person is described by a pair of…
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is…
ArrayList is a resizable implementation of List interface, ArrayList can also be called as a dynamic Array. Like Array, ArrayList…
This website uses cookies.