## A Programmer’s approach of looking at Array vs. Linked List

A Programmer’s approach of looking at Array vs. Linked List – Linked List – In general, array is considered a data structure for which size

Browsing Tag

27 posts

A Programmer’s approach of looking at Array vs. Linked List – Linked List – In general, array is considered a data structure for which size

C Programming-Merge Sort for Doubly Linked List – Searching and Sorting – Merge sort for singly linked list is already discussed. The important change here is to modify the previous pointers also when merging two lists

PYTHON Programming-Merge Sort for Doubly Linked List – Searching and Sorting – Merge sort for singly linked list is already discussed. The important change here is to modify the previous pointers also when merging two lists.

Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists? – Searching and Sorting – Quick Sort in its general form is an in-place sort. whereas merge sort requires O(N) extra storage, N denoting the array size which may be quite expensive.

Insertion Sort for Singly Linked List – Searching and sorting – We have discussed Insertion Sort for arrays.In this article linked list is also discussed.

Binary Insertion Sort – Searching and Sorting – We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to insert the selected item at each iteration.

JAVA programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting – Given a sorted array and a number x, find a pair in array whose sum is closest to x.

C++ programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting – Given a sorted array and a number x, find a pair in array whose sum is closest to x.

C programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting.- Given a sorted array. find a pair in array whose sum is closest to x.

Search in an almost sorted array – Searching and Sorting – A simple solution is linearly search given key in given array.Time complexity of solution is O(n).We cab modify binary search to do it in O(Logn) time.