BeautifulCode
BAN USER- 0of 0 votes
AnswersA legend among a group of n people is a person who is top rated in all respects.The task is to identify a legend by asking a single question of the form "who deserves it?" Design an efficient algorithm to identify a legend or determine if the group has no such person.How many questions does your algorithm need in the worst case??
- BeautifulCode in United States| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
AnswersMagic squares:
- BeautifulCode in United States
A magic square of order n is an arrangement of the numbers from 1 to n^2 in an n by n matrix with each number occuring exactly once so that each row,each column and each main diagonal has the same sum.
Any other better approach than exhaustive search approach??? Even this is not working in many instances of n.| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
AnswersAny other faster way to solve the closest-pair problem than the one with the brute-force approach???
- BeautifulCode in United States| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
Answershow do i sort the list {do,while,for,int,if} in lexical order using selection sort??? Basically i am looking for ways to
- BeautifulCode in United States
handle the string.I mean should i first get the ASCII values of each of these and sort it accordingly???| Report Duplicate | Flag | PURGE
Algorithm
- 3 Answers johnson trotter algorithm
Which algorithm should i use to implement it???
- BeautifulCode October 12, 2012
Dealing with the direction is the issue.As a solution i thought of implementing it as an array where indices would be left arrow and right arrow.Any other alternative solution to this algo???| Flag | PURGE
use Breadth-first search.
- BeautifulCode October 15, 2012heap permute algorithm is another one! but i want clue for this algorithm.
- BeautifulCode October 13, 2012can you please let me know the exact algorithm for this??
- BeautifulCode October 12, 2012I found this question in "introduction to the design and analysis of algorithms by anany levitin".No more clues about this question.so posted it to get more idea about it.
- BeautifulCode October 11, 2012I have read that! Was thinking of even orders of n in general.
- BeautifulCode September 14, 2012But this doesn't work for even values of n.Any hint for this??
- BeautifulCode September 13, 2012@Anonymous
By closest pair problem we mean that we got to find the those pair of vertices out of n vertices which has the shortest distance between them.
thank you mukesh :) nice resource :)
- BeautifulCode September 12, 2012how about the efficiency if implemented using linked-list instead of array version???
- BeautifulCode September 10, 2012The original question is what i have written.It has to be solved by selection sort and using language C.
- BeautifulCode September 10, 2012
it is 3.unless and until stated we shouldn't consider the extremities of columns or rows to check for adjacency.
- BeautifulCode October 17, 2012