GeekInterview.com
  I am new, Sign me up!
 

Algorithm Questions


Algorithm Questions

Questions: 37
Comments: 138
 Showing Questions 11-20 of 37 Questions
<< Previous 1 [2] 3 4 Next >>
 Sponsored Links

 
 Algorithm Questions
Sorting Options :  

What is the importance of algorithms in the field of computer science? 

You have n numbrer Node objects - could be 1,000,000 for all you know. Each Node has a getNext() method that returns the next Node (a linked list).But the chain of n number of Node objects linked together 
Latest Answer: Take two pointers P1 and P2.Initially let P1 and P2 point to starting node (S) and set counter to zero.increment the counterthen check while(1) {if p1 == p2 ->next{   print the counter value this is the node where circle starts.   ...
Read Answers (1) | Asked by : wcmaggot

What is the complexity of a algorithm of finding the Cyclic Directed Graph? 
Latest Answer: use BFS or DFS time complexity is O(V+E) ...

Write an algorithm that calculates all the elements of rows and columns of a square matrix and calculate the total of primary and secondary diagonal. 
View Question | Asked by : wiseboy

How many values can be held by an array with dimensions A(0:n), B(-1:n,1:m), C(-n:0,2)? 
Latest Answer: A(0:n) = n+1 elements-1 specifies that the array indexing starts at '-1' uptill 'n'. Therefore, there can be "n-(-1)+1 = n+2" rows in the array. Each of this row may hold upto m (m-1+1) elements. Therefore, B(-1:n, 1:m) = (n+2)*(m) ...

How to find time complixity? 

You are given a matrix. The matrix elements are such that they are sorted both horizontally and vertically. Given an element of the matrix, your job is to obtain its position in an efficient manner.Example: 
Latest Answer: I'm assuming the matrix is NxM (not necessarily square) and there are no duplicate values (otherwise the search should return multiple results).So that said, you can do the following:1) go to the "center" of the matrix (dividing it in 4 ...

You have an array of size '2n' of these, 'n+1' elements are distinct and 1 element is repeated 'n' times. You must find the repeated element and say how many times it has 
Latest Answer: The number of times the element is repeated is known. No? It is 'n'. Given that info you find the product of all the numbers say 'P'. Now find the largest number say x in the array such that P is divisible by x^n. ...

What is meant by algorithm profiling? 
Latest Answer: In recent years, several very efficient exact optimization algorithms have been developed in the computer science community. Examples are maximum flow algorithms, minimum-cost flow techniques, matching methods, which all are graph theoretical approaches ...

What is validation of an algorithm? 
Latest Answer: The process of measuring the effectiveness of an algorithm before it is coded to know the algorithm is correct for every possible input.This process is called validation. ...

View page << Previous 1 [2] 3 4 Next >>

Ask A Question
Go Top
 Sponsored Links

 
Sponsored Links

 
Ask Question
You must login to Ask Question or Register your free account

Category:

 
Question Title:


Question in Detail:

Add this to my Subscribed Questions (?)
Send me email when new answer is posted (?)

 
Subscribe
Get Latest Updates Via RSS Reader or by Email
 Forum Discussion Subscribe to Forum Discussions Via E-Mail Latest Forum Discussions Subscribers
 Knowledge Base Subscribe to Knowledge Base Series Via E-Mail Knowledge Base Subscribers
 Learning Series Subscribe to GeekInterview Learning Series Via EMail Learning Series Subscribers
 Freelance Jobs Subscribe to GeekInterview Freelance Jobs Via EMail Latest Freelance Jobs Subscribers
 GeekInterview Blog Subscribe to GeekInterview Blog Via EMail GeekInterview Blog Subscribers
 Testing Interview Questions Subscribe to Testing Interview Questions Via EMail Testing Interview Questions Subscribers
 Oracle Interview Questions Subscribe to Oracle Interview Questions Via EMail Oracle Interview Questions Subscribers
 Java Interview Questions Subscribe to Java Interview Questions Via EMail Java Interview Questions Subscribers
 Latest Placement Papers Subscribe to Latest Placement Papers Placement Papers Subscribers
 Free Training Subscribe to Free Training Via EMail Free Training Subscribers
 Learn AJAX Subscribe to AJAXwith.com Via EMail AJAXwith Subscribers
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape