Since array may be unsorted here finding perticular elemnt itself take O(n) time . but array property is continuous memory allotment means no gap present between so to insert ans element may require shifting of n-1 element . so total O(n) +O(n)= O(n)