Tags » Linked List

Tuning The Linux Connection Tracking System

Introduction

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

tcp  6 313301 ESTABLISHED src=10.0.0.13 dst=10.0.0.13 sport=58349 dport=3306 src=10.0.0.13 dst=10.0.0.13 sport=3306 dport=58349 mark=0 secctx=system_u:object_r:unlabeled_t:s0 zone=0 use=2… 558 more words

Testing & Performance

Linked List Cycle I (LeetCode OJ Java Solution)

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

Follow up:
Can you solve it without using extra space?


/**
 * Definition for singly-linked list. 84 more words
Java

Linked List Cycle ll (LeetCode OJ Java Solution)

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

Follow up:
Can you solve it without using extra space? 144 more words

Java

Add Numbers (LeetCode OJ Java solution)

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. 196 more words

Java

Insertion Sort List

Sort a linked list using insertion sort.

Problem link

Solution

  • insertion sort: the sub-array on the left are sorted, new elements are inserted into the proper position on the left…
  • 328 more words
Algorithm

Reverse Linked List II

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

For example:
Given 1->2->3->4->5->NULL, m = 2 and n = 4, 160 more words

Algorithm

Detect and Remove loop in Linked list

Till now the efficient solution of the problem is using slow and fast pointers.

For GeeksforGeeks link  click Here

I have used a different approach. We know that in a linked list with loop when we are trying to find the node which cause the loop(Let’s name it Looped node), we would already traverse the node which is pointed by the looped node. 377 more words

Data Structures