-
Time Complexity
How to find time complexity?
-
Quicksort Algorithm
Demonstrate the quicksort algorithm to sort a list of data elements
-
Traverse Binary Tree in Inorder
Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in inorder.
-
-
Conventional Iterative Algorithm
Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in postorder.
-
Algorithm to Traverse Binary Tree
Design a conventional iterative algorithm to traverse a binary tree represented in linked lists in preorder.
-
Cyclic Directed Graph
What is the complexity of a algorithm of finding the Cyclic Directed Graph?
-
Validation of an Algorithm
What is validation of an algorithm?
-
Algorithm Profiling
What is meant by algorithm profiling?
-
Sub matrix
U are given a n*n square matrix where each element is either 0 or 1....u have to find the square submatrix with the largest length such that all the elements along the border of that square submatrix matrix is 1 ....
-
Algorithm
Bring out the importance of Algorithms in the field of Computer Science?
-
A(x) + a(y) = M
Given a1, a2, .... a(n) integers & M, return true or false if there exist a(x) + a(y) = MOnce you're done, do it using a hash table.
-
How many trees are now left in Granada National Park?
Peter has a method for solving quadratic equations. For example, Peter solves 6x2
+ x – 2 = 0 as follows:
(a) Peter multiplies the leading coefficient (6) by the constant coefficient (2)
to get x2 + x – 12 = 0 to get (x+4)(x-3) = 0
(b) Peter then replaces each x by 6x (x times the leading coefficient) to get
(6x+4)(6x-3) = 0
(c) Peter then simplifies this equation to get (3x+2)(2x-1) = 0, which solves
the original equation.
Prove or disprove that Peter’s method always works.
">Two mathematicians were surveying the damage done to Granada National Park by Hurricane Ivan. “It could have been worse,” said one. “Less than one third of the trees were lost.” His friend replied, “Yes, in fact if you multiply by 10 the number formed by taking the last two digits of the number of trees there used to be, and add to this the number formed by removing the last two digits of the number of trees there used to be, then you obtain the number of trees there is now". Not to be outdone, the first mathematician said “And if you take the number of trees that were lost, and reverse the order of the last two digits, and then insert a zero in front of the last two digits, then you get the number of trees that there used to be plus the number of trees that there are now”.How many trees are now left in Granada National Park? Peter has a method for solving quadratic equations. For example, Peter solves 6x2+ x – 2 = 0 as follows:(a) Peter multiplies the leading coefficient (6) by the constant coefficient (2)to get x2 + x – 12 = 0 to get (x+4)(x-3) = 0(b) Peter then replaces each x by 6x (x times the leading coefficient) to get(6x+4)(6x-3) = 0(c) Peter then simplifies this equation to get (3x+2)(2x-1) = 0, which solvesthe original equation.Prove or disprove that Peter’s method always works.
-
Algorithm Questions
Ans