# Is the overall time complexity of an algorithm effected if it calls another algorithm to perform it's functionality?

I am trying to design an algorithm with O(1) time complexity (TC) that returns a value from an array that ISN'T the smallest value. I understand that searching the array and comparing it's elements to find the smallest will give the algorithm linear O(n) TC so that wouldn't work.

What I want to know is, if I write a separate method that uses a sorting algorithm to sort the array first and then return the smallest, will this effect the TC of the algorithm I am trying to design?

Here's my...

By: StackOverFlow - Tuesday, 6 November

# Related Posts

- Older News
- How to make this kind of custom algorithm in JAVA? StackOverFlow (Today) - I am enhancing my Java skills for my own personal purpose,And I am wondering, how to make this algorithm in Java :* 2 3 4 5* * 3 4 5*...
- Have I achieved linear time complexity O(n) for this array comparison algorithm? StackOverFlow (Yesterday) - I am writing a method that compares 2 arrays, a and b, and returns "YES" if all the elements of b are present in a, and "NO" otherwise. The algorithm...
- Algorithm to find, given a number of dominoes a combination in which the dominoes placed side by side show the same sum for the upper and lower part StackOverFlow (Yesterday) - So in the last 72 hours, this problem has driven me crazy:The goal is to create a program that given a set of dominoes[a, b] of size N, where N...
- Java List to create a secondary list with limited size StackOverFlow (Yesterday) - In My Spring/java project i want to broadcast Limited Channel calls. Suppose here 500 contact numbers and 10 Gateway Channels. here i want to call 10 by 10 contact and...
- Stackoverflow error in Quick Sort algorithm StackOverFlow (2 days ago) - So, my professor just gave us a homework to analyze the runtime of seven different sorting algorithms. Problem is: the Quick Sort algorithm he provided us is giving Stack Overflow...
- Java: I have implemented 3 Search Algorithms. How I store these algorithms in a list (as method calls) and iterate over them in main? StackOverFlow (2 days ago) - Briefing:I have implemented three search algorithms to break a lock. A lock can be broken by the actions shaking, pulling, pulling, or poking. These are 4 methods can be applied...
- Selection problem - Time complexity for a binary heap StackOverFlow (2 days ago) - I found this link and implemented it (copy paste). I wonder how I can show that the time complexity of the methods run in O(N log N), for example by...
- How to solve algorithm StackOverFlow (3 days ago) - You have a friend who runs a bakery. They are competing to be the most efficient bakery in their city. They are very precise about the amount of each ingredient...