Posts

Showing posts from August, 2017

Sorting Technique

                                                                  Sorting Technique Home Sorting is a process of arranging list of element in ascending or descending order. Sorting always works on collection of list elements i.e Array, List(java).  We can sort the elements in two different order either ascending or descending.  Sorting is the process of placing elements from a collection in some kind of order. For example, a list of words could be sorted alphabetically or by length. A list of cities could be sorted by population, by area, or by zip code.  Binary Search will always works on Sorted elements.  Before getting into specific algorithms, we should think about the operations that can be used to analyze a sorting process. First , it will be necessary to compare two values to see which is smaller (or larger). In order to sort a collection, it will be necessary to have some systematic way to compare values to see if they are out of order. The total number of comparis

Hashing Technique

Image
Home In all search techniques like Linear search , binary search and search trees, the time required to search an element is depends on the total number of element in that data structure. In all these search techniques, as the number of element are increased the time required to search an element also increased linearly. Hashing is another approach in which time required to search an element doesn't depend on the number of element. Using hashing data structure, an element is searched with  constant time complexity . Hashing is an effective way to reduce the number of comparisions to search an element in a data structure. Hashing is defined as follows... Hashing is the process of indexing and retrieving element (data) in a data structure to provide faster way of finding the element using the hash key. Here, hash key is a value which provides the index value where the actual data is likely to store in the data structure. In this data structure, we use a concept called  Ha

Binary Search Technique

Image
                                                             Binary Search Technique Home Note-  Search is a process of finding a value in a list of values . In other words, searching is the process of locating given value position in a list of values. Binary search algorithm finds given element in a list of elements with  O(log n)  time complexity where  n  is total number of elements in the list or array . The binary search algorithm can be used with only sorted list of element. That means, binary search can be used only with list of element which are already arranged in a order . The binary search can not be used for list of element which are in random order. This search process starts comparing of the search element with the middle element in the list. If both are matched, then the result is "element found". Otherwise, we check whether the search element is smaller or larger than the middle element in the list. If the search element is smaller, then we repeat t

Linear Search Technique

Image
Home       What is linear search technique and how to implement in java programming language? Ans:-    Linear search algorithm finds given element in a list of elements with  O(n)  time complexity where  n  is total number of elements in the list. This search process starts comparing of search element with the first element in the list. If both are matching then results with element found otherwise search element is compared with next element in the list. If both are matched, then the result is "element found". Otherwise, repeat the same with the next element in the list until search element is compared with last element in the list, if that last element also doesn't match, then the result is "Element not found in the list". That means, the search element is compared with element by element in the list. When data items are stored in a collection such as a list or array, we say that they have a linear or sequential relationship. Each data item is stored in

Data Structure Using Java

                                                                                 Data Structure Index: 1. Search Technique      a) Liner Search      b) Binary Search      c) Hashing  2. Sorting Technique      a) Insertion Sort      b) Selection Sort      c)Merge Sort      d)Heap Sort      e)Bubble Sort      f)Quick Sort      g)Counting Sort      h)Radix Sort      i)Bucket Sort       3) Link List 4) Advantage of Web services Q1.   What is search technique in programming language?  Ans:-    Searching is the algorithmic process of finding a particular item in a collection of items. A search typically answers either True or False as to whether the item is present. On occasion it may be modified to return where the item is found.Searching is the algorithmic process of finding a particular item in a collection of items. A search typically answers either True or False as to whether the item is present. On occasion it may be modified to return where the item is fo