Detect Loop in linked list
You are given the head of a singly linked list. Your task is to determine if the linked list contains a loop. A […]
You are given the head of a singly linked list. Your task is to determine if the linked list contains a loop. A […]
You are given a special linked list with n nodes where each node has two pointers a next pointer that points to the next
Given the head of two singly linked lists num1 and num2 representing two non-negative integers. The task is to return the head of the linked list
Given the head a linked list, the task is to reverse every k node in the linked list. If the number of nodes is not a
Given the head of two sorted linked lists consisting of nodes respectively. The task is to merge both lists and return the head of the sorted merged list. Examples:
Given the head of a singly linked list, your task is to left rotate the linked list k times. Examples: Input: head = 10 -> 20
Given the head of a linked list, the task is to reverse this list and return the reversed head. Examples: Input: head: 1 ->
Given an array, arr[] construct a product array, res[] where each element in res[i] is the product of all elements in arr[] except arr[i]. Return this resultant array, res[].Note: Each
Given an array arr of 0s and 1s. Find and return the length of the longest subarray with equal number of 0s and 1s. Examples: Input:
Given an array arr[] containing integers and an integer k, your task is to find the length of the longest subarray where the
Given an array of integers arr[],the task is to find the first equilibrium point in the array. The equilibrium point in an array
Given an array arr[] of non-negative integers, where each element arr[i] represents the height of the vertical lines, find the maximum amount of water that can be contained between