"""One of the most fundamental data structures in any language is the array.
Python doesn't have a native array data structure,
 but it has the list which is much more general and can be
 used as a multidimensional array quite easily."""

'''
http://interactivepython.org/courselib/static/pythonds/SortSearch/TheQuickSort.html
'''

def hasDuplictes(list):
    for x in range(0,len(list)):
        for y in range(x + 1, len(list)):
            if list[x] == list[y]:
                print "Duplicate found",list[x]
            else:
                print "Nu Duplicated"


def unSortedArray():
    # aList = [123, 'xyz', 'zara', 'abc', 'xyz'];
    aList = [101,11, 21,51,90,91,101,500,433,191];

    aList.sort();
    visited=set(aList)

    print "Dup remvoed " , visited

    nonDuplicate = []
    for value in aList:
        print value
        nonDuplicate.append(value)

    lenth = len(aList) - 1
    print lenth

    first = 0
    last = lenth

    while first <= lenth:
        print first
        first = first + 1




   # print "List : ", aList




unSortedArray()


aList = [101, 11, 21, 51, 90, 91, 101, 500, 433, 191]
hasDuplictes(aList)
