The reorderList function will return the head of the reordered linked list given a linked list as input

Reorder Linked Lists

Implement a reorderList function that takes the head of a linked list (node(0) -> node(1) -> node(2) -> .. -> node(n-1) -> node(n)) as input and reorders its nodes in the form node(0) -> node(n) -> node(1) -> node(n-1) -> node(2) -> .. .

February 15, 2024 · 7 min · Avnish
The mergeTwoLists function will return the head of the merged linked list given two sorted linked lists as input

Merge Two Sorted Linked Lists

Implement a mergeTwoLists function that takes the head nodes of two sorted linked lists as the input and returns the head of the merged linked list

January 29, 2024 · 3 min · Avnish
The reverseList function will return the head of the reversed linked list

Reversing Linked Lists

Implement a reverseList function that takes the head of a linked list as the input and returns the head of the reversed linked list

January 26, 2024 · 4 min · Avnish
We can improve the time complexity of some solutions from quadratic to linear using the two-pointer approach

Two-Pointer Approach

The two-pointer approach provides an efficient alternative for solving problems related to substrings, subarrays, and sequences.

January 23, 2024 · 7 min · Avnish
Prompt LLMs directly from your code editor using Ollama integrations

Self Hosting LLMs using Ollama

Hosting Large Language Models (LLMs) on your infrastructure and integrating them with your development environment

January 12, 2024 · 7 min · Avnish