Sort by


  • RLE Run Length Encoding

    Run-length encoding (RLE) is a simple form of data compression in which runs of data are stored as a single data value and count.

    This is most useful on data that contains many such runs: for example, relatively simple graphic images such as icons, line drawings, and animations. This method was used for Fax encoding.

    by Christian on 02 Nov 10
    0
    409 downloads
    0
  • RLE - Run Length Encoding (Matlab)

    A Matlab implementation of RLE (Run Length Encoding) demonstration that takes a string and compresses it.

    Works well when long sequences of the same letter appear in the string.

    by Omri on 02 Nov 10
    0
    741 downloads
    2
  • Single Sided Linked List in Java

    Singly linked list (also known as, linked list) is a data structure that serves the purpose of a dynamic array. Every item in that list contains two parts- data, and pointer to next item. The first item is pointed by a pointer known as "head". And, the last item has "null" to its next, which means the end of list.

    There can various of methods in a linked list, such as- goFirst(), insert(), remove(), etc. Here is an implementation of linked list in Java with basic functionality. It can hold integer type data.

    by javadream on 05 Nov 10
    0
    355 downloads
    0
  • Doubly Linked List in Java

    Doubly linked list is a data structure that serves the purpose of a dynamic array. Every item in that list contains three parts- data, pointer to next item and pointer to previous item. The first and last items are pointed by pointers known as "head" and "tail" respectively. The last item has "null" to its next, which means the end of list. Similarly, the first item has "null" to its previous, which means starting of the list. Unlike singly linked list, this list is able to move in both forward and backward direction.

    by javadream on 05 Nov 10
    0
    507 downloads
    0
  • Stack in Java

    Stack is a LIFO (Last In First Out) type data structure. The last item to enter stack always comes out of the stack first. This data structure is very useful in implementing many algorithms.

    Here is an implementation of stack using Java. It stores integer type data so it's a very simple implementation. Good as a tutorial for data structures 101.

    by javadream on 05 Nov 10
    0
    353 downloads
    0
  • Queue demo in Java

    Queue is a FIFO (First In First Out) type data structure. The first item to enter queue always comes out of the queue first. In queue, data is inserted (enqueue) in its "rear" and extracted (dequeue) from its "front".

    Here is an implementation of queue using Java. It stores integer type data. It's simple and easy to understand.

    by javadream on 08 Nov 10
    0
    382 downloads
    0
  • Binary Search Tree (BST) in Java

    Binary search tree is a tree type data structure. Each node can have at most two immediate children. Binary search tree (BST) also have some special properties- 1) For any node, the node value will be greater than the values of all the nodes of the left subtree (if any). 2) For any node, the node value will be less than (or equal to) the values of all the nodes of the right subtree (if any). 3) For any node, it's left and right subtrees (if any) will also be binary search trees.

    Here is an implementation example of BST in Java.

    by javadream on 08 Nov 10
    0
    405 downloads
    0
  • Binary Heap

    Binary heap is a tree type data structure. It has all the properties of binary search trees including the following ones-

    1) All the levels of the binary tree must be filled except the last one. Levels are filled from left to right order. This property is known as shape property.

    2) Each node's value must be less than or equal to all it's child nodes values [for min-heap]. Or, Each node's value must be greater than or equal to all it's child nodes values [for max-heap]. This property is known as heap property.

    by javadream on 12 Nov 10
    0
    475 downloads
    0
  • Java Binary Search

    Binary search Algorithm is a very effective search algorithm for a sorted array. It has worst case running time of O(log n). This java implementation of binary search assumes input to be an integer array and the array is sorted in ascending order.

    by javadream on 13 Nov 10
    0
    397 downloads
    0
  • Bubble Sort Algorithm in Java

    Bubble sort is very popular and one of the easiest sorting algorithms available. It passes over the array several times (actually less than the number of elements in the array). At each pass, it compares two consecutive elements and swaps them if necessary. It has worst case running time of O(n^2) and best case running time of O(n).

    by javadream on 13 Nov 10
    0
    477 downloads
    0