Tags » Linked List

Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

Problem link

Solution

  • using a priority queue to keep the organize the k current candidates…
  • 130 more words
Algorithm

Linked List: The Identity Crisis

One of the simplest data structures that you learn as a software engineer is the linked list. A linked list consists of a collection of nodes that are strung together in a sequence. 424 more words

Data Structures

Copy List with Random Pointer

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. 187 more words

Algorithm

Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.

For example,
Given 1->2->3->3->4->4->5, return… 129 more words

Algorithm

Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.

If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is. 194 more words

Algorithm

Tuning The Linux Connection Tracking System

Introduction

The connection tracking entry (conntrack entry) looks like this:

udp 17 170 src=192.168.1.2 dst=192.168.1.5 sport=137 dport=1025 src=192.168.1.5 dst=192.168.1.2 sport=1025 dport=137 use=1

It contains two elements the original direction (the red) and the reply direction (the blue). 564 more words

Testing & Performance