Solve This (? + ? + ?=30)
If 1111=R, 2222=T, 3333=E, 4444=N Then 5555=?
Guess the Hindi Muhawara from the following whatsapp Emoticons?
Sweet, Medicine, Film, Girl, City, Car, Place, Doggy all are name same, guess which word it is?
Guess me who am I, I am the first on earth, the second in heaven...
A girl is blind, deaf, dumb and uneducated too. A boy loves her. How would he propose without touching her?
Four Question, One Answer: One River Name, One Flower Name, One Film Name, One Actress Name?
Which Indian cricketer is known as "Brown Bradman"?
Which of the countries has had a prime minister whose name featured the name of his country?
Which Indian company has become the official sponsor of the Afghanistan cricket team for the 2019 ICC World Cup?
Looking for basic steps to analyse the algorithm.
There is no generalized answer only few tips can be suggested -
An algorithm that does not contain any loops (for example: Write Text to Console, Get Input From User, Write Result To Console, a hash function etc) is O(1), no matter how many steps. The "time" it takes to execute the algorithm is constant (this is what O(1) means), as it does not depend on any data.
An algorithm that iterates through a list of items one by one has complexity O(n) (n being the number of items in the list). If it iterates two times through the list in consecutive loops, it is still O(n), as the time to execute the algorithm still depends on the number of items only.
An algorithm with two nested loops, where the inner loop somehow depends on the outer loop, is in the O(n^x) class (depending on the number of nested loops).
An binary search algorithm on a sorted field is in the O(log(n)) class, as the number of items is reduced by half in every step.
A recursive or iterative approach where we are using divide and conquer to solve some problem i.e. quicksort etc have O(nlog(n)).
While reading possible time complexity i found that time complexity O(log log n) exist for some algos,
Can any one explain an example which shows the calculation of the time complexity with O(log log n)
Assume priority queue in Dijkstra’s algorithm is implemented using a sorted link list and graph G (V, E) is represented using adjacency matrix.
What is the time complexity of Dijkstra’s algorithm (Assume graph is connected)?
Say we only know the worst case and best case complexity of an algo (Algo is not known). Is it possible to get the average case complexity?
Forgot Your Password?
2018 © Queryhome