406 Topics
| |
Hello, I am new to this web and new to programming. I am not sure what does mean the following algorithm: set counta = 0 set countb = 0 read number while read was succesful do if number mod 2 equals 0 then set counta = counta + 1 otherwise … | |
/*Ok I have code that's behaving unexpectedly The following program is supposed to print prime numbers for n1=100,n2=1000,n3=10000 and n4=100000 except that for n1=100, it prints the squares of primes less than 10. I can implement this same program in c++ and wouldn't get such output. I need another pair … | |
hi everyone i need your help in making course timetable algorithm in php? | |
This is a piece of code I wrote a long time ago when I saw someone make a "guess this scrambled word" game. The program didn't have to unscramble the word to know what the answer was, but I wanted to do it anyways. I wanted an algorithm that could … | |
How can I use the flood fill algorithm in practice? How can I implement it? | |
hello..i got a probem here.. You see that i have been given a task that is to make group of 4 people. The data i had received were 79 names including their ID, gender and races.... There are condition need to be satisfy that are in a group there should … | |
Hello all, I'm having trouble getting google to give me anything useful because I don't know the name of the algorithm I'm looking for. ![line_types](/attachments/large/1/line_types.png "line_types") This image shows different ways of connecting two points together, A is just plain lines, C is bezier curves but what is the algorithm … | |
I know it's a bad practice to post the same question on more than one help site (I posted it on Stackoverflow, but after some time your question loses its place on the "active" list and people stop reading it) but I'm really desperate here. So my question is: I … | |
As many of you are probably aware, DaniWeb was hit hard by Google's Panda algorithm update back in February. A news story written by Davey entitled [url=http://www.daniweb.com/internet-marketing/search-engine-optimization/news/350575]Google Farmer Update: what went wrong?[/url] explained that the February 24th Panda algorithm targeted at content farms literally cut DaniWeb's US traffic by half. … | |
If a heap is like a binary search tree shouldn't it search in O(log n)? | |
Hi there, I am having trouble understand how they derive these running times for the code in the image below. [http://i.imgur.com/usK9U.jpg](null) I am having trouble especally with log n running times, how are they derived? especially the bottom left slide. If someone can shed some light on this, I would … | |
Hey, I have a problem - I'm to write how can a genetic algorithm document clustering program I wrote be combined (and benefit from that) with a "standard search engine". What could be considered a "standard search engine", in the given context? | |
I am currently working on kind of multi-graph structure. The thing is that two graphs are needed for my application which span the same vertices but with two distinct set of edges (i.e., a multi-graph). The first graph is a binary search tree, while the second graph must be general … | |
Quickselect, based on quicksort, and counting select, based on counting sort. Each is capable of finding the kth smallest element in an unsorted/sorted list/array. This is some example code for a QuickSelect algorithm. This doesn't include the partition function. // return the kth smallest item int quickSelect(int items[], int first, … | |
Please can you help me to calc the complexity of this algorithm it may looks easy but i am new to all that int f=1; int x=2; for (int i = 1; i <= n; i*=2) for (int j = 1; j <= i * i; j++) if (j % … | |
Hi All, I am writing a program to find the smallest positive integer that has n or more divisors. My program gives me correct answer for input values upto 4 but it produces erroneous answers for input values above 4. For example, it gives 10 as integer having 5 divisors. … | |
Well i have two questions here:- 1. If f(n) is function whose growth rate is to be found then, Is for all three notations will the g(n) be same, like for f(n)=O(g(n)) and similaraly for omega and theta ? 2. Theta notation is "omega and Oh" if in some case … | |
i am looking for information source on an algorithm for parametric surfaces design in 3d. i just need advice on how to go about it. the language used for the algorithm is not a matter but rather the idea on how the algorithm is to be is of paramount importance. … | |
Dear All, I have written a program to find the smallest divisor of an input number. The code gives me an error in lines 19 and 23. The error is invalid operands to binary %. Please help me to troubleshoot, thank you. Below is my code: #include<stdio.h> #include<stdlib.h> #include<math.h> int … | |
Dear All, I have written a program that finds the integer whose square is closest to but greater than the integer number input as data. But it is giving me an erroneous answer. My algorithm is: 1. Select a number which is half the input number. 2. Square it and … | |
So I'm developing this minesweeper flags game and I have to deliver it in a couple of days, and I've already created the algorithm to show the numbers around the flags but it isn't working. Here's my project: http://www.tempfiles.net/download/201205/241554/flaghunter.html Could anybody give any help? :0 Best regards, jprs.22 | |
| > My code Not working Why ???? there is some processor fault Error |
Hello, I am trying to implement a version of the cubic spline based on the artilce here: [Click Here](http://en.wikipedia.org/w/index.php?title=Spline_%28mathematics%29&oldid=288288033#Algorithm_for_computing_natural_cubic_splines) and while implementing it I find errors that my indices are out or range such as: ` h[i]=(n[i+1]-n[i]) IndexError: list index out of range ` Here's a part of the code: … | |
Hello! I want to ask you guys if anyone can help me correct my current program to read graph from a file instead of adding manual matrix in program. Example graph: graph.txt 8 1 2 3 1 3 6 1 8 1 2 3 2 2 8 2 3 4 … | |
Hi everybody, Please excuse the noob question as I am new to STL in C++. I am trying to write a very basic program which uses iota. However my compiler is complaining that iota does not exist in algorithm. Some other forums suggested including <backward/algo.h> as iota could have been … | |
I have an assignment question . We need to simulate FCFS scheduling algorithm using C on linux OS. This is what I need to do Write a program to simulate **FCFS scheduling algorithm** using pipes for inter process communication. 1. Let the parent program be the scheduler. 2. It takes … | |
Hello! I just want to ask you guys if anyone can help me reedit my program from BFS to DFS. I know how BFS works but i can't figure it out how to write the sintax. So i would please ask you guys if you could help me out. Heres … | |
Hello! I started learning C++ and I just discovered pointers. Well, it's a little bit hard for me to understand what's the point of it so I'll just explain my problem. I want to create a code in which I compute results using arithmetic operations (+, -, ÷, ×,%, ^ … | |
Can someone show me algorithm so i can sort array like this? [Picture](http://i.imgur.com/HhQ4I.jpg) |
The End.