Rotate List
Given the head of a singly linked list and an integer k, rotate the linked list to the right by k places. The rotation means moving the last k nodes…
Master C, C++, Data Structures, Algorithms, Design Patterns, and More!
Given the head of a singly linked list and an integer k, rotate the linked list to the right by k places. The rotation means moving the last k nodes…
Given the head of a singly linked list, reverse the list in-place and return the new head of the reversed linked list.
You are given the availability of two people's schedules, represented as lists of intervals . Each interval represents the available time for each person, and it is a closed interval…
Given a list of meeting intervals, represented as pairs of integers , where start denotes the start time of the meeting and end denotes the end time of the meeting,…
Given a list of meeting intervals, represented as pairs of integers , where start denotes the start time of the meeting and end denotes the end time of the meeting,…
You are given a list of employees’ working hours as a list of intervals. Each interval represents the working hours of an employee, and it is a closed interval (inclusive)…
An intersection is a closed interval that represents the overlap between two intervals. If there is no intersection, the result should be an empty list.
Given a collection of non-overlapping intervals, represented as pairs of integers , where start denotes the start time of the interval and end denotes the end time of the interval,…
Given a collection of intervals, represented as pairs of integers , where start denotes the start time of the interval and end denotes the end time of the interval. Merge…
Given a collection of intervals, represented as pairs of integers , where start denotes the start time of the interval and end denotes the end time of the interval. Find…