Linked List

­

[Leetcode] Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |

Linked Lists

A basic linked list is a da data stucture of nodes in which every previous node has a reference to the next node.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , |

[Leetcode] Reverse Linked List

Reverse a singly linked list.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , |

[Leetcode] Add Two Numbers

Add two linked lists representing two non-negative numbers.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , |

[Leetcode] Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , |

[Leetcode] Linked List Cycle

Given a linked list, determine if it has a cycle in it.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |

[Leetcode] Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.

November 28th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |

[Leetcode] Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.

November 14th, 2015|Categories: DS and Algorithms, Hash, Linked List|Tags: , , , |

[Leetcode] Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , |

[Leetcode] Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |

[Leetcode] Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , |

[Leetcode] Delete Node in a Linked List

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , |

[Leetcode] Intersection of Two Linked Lists

Write a program to find the node at which the intersection of two singly linked lists begins.

November 14th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |

[Leetcode] Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.

[Leetcode] Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.

December 7th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |

[Leetcode] Palindrome Linked List

Given a singly linked list, determine if it is a palindrome.

December 12th, 2015|Categories: DS and Algorithms, Linked List|Tags: , , , , |