405 Topics
|
|
I recently took upon myself the challenge of finding the actual subsequence in an array that yields the largest sum rather than just the largest sum. Example - if you enter {3,2,-5,4} in an array, my program returns {3,2}, since that yields the largest sum, 5. I thought myself rather … |
|
I'm new to C/C++ and I'm having difficulty with calculating leap years in my Zeller's Algorithm program (based off of the Gregorian Calendar). I've lost sleep over this code for the last week and this is my final breaking point. I continually get "This day is Friday." for input 1 … |
|
In the following problem I have to find the number > 40755 which is triangular,pentagonal and hexagonal. The formulas for these type of numbers are given below. As I read every hexagonal number is also triangular so we have to compare pentagonal with hexagonal numbers. This algorithm gives 9 digit … |
|
In these problem I have to find triangular number by the number of it's divisors. The program takes about 0.65 seconds to find the first triangular number with >100 divisors and about 87 seconds for the number with >200 divisors which means that my algorithm is very inefficient. Any help … |
|
I have this Algorithm that sorts array of integers implemented in a simple inventory system in Visual Basic 6.0 for my thesis. The system can sort items by total price, unit price, quantity, etc. But when the input number is within 7 or more digits (ex: 3,382,328), the application produces … |
|
This is a program for getting the sum of prime numbers of given range. The problem is that it would take hours if the limit is about 1000000. I've read about the sieve of Eratosten but having difficulties with implementing it. Could someone help to make this piece of code … |
|
Hello, I am working on an assignment and I am so stuck and I have no clue how to get out. We are giving a maze and we are to find start and finish of the maze. The code is interpreted as giving the "walls" of the cell by looking … |
|
I'm making a project with OpenCV about tracking. But what I want is the ability to let the user import his own tracking algorithms. Is there some way that i can check in a specified folder if there are new algorithms added and how can I include them in my … |
|
I've been messing around with basic GAs in Java but I seem to have run into an algorithmic problem but can't seem to find where exactly. My code seems to narrow down the average fitness very quickly, but then seems to hover around the right answer without getting there pretty … |
|
I want to know which os these is bigger 1)f(n)=n^(3/2) 2)f(n)=n log(base2) n Please explain? |
|
So I've been working on a program that takes a string and then puts it in an i * 6 char array but I can't seem to get it to work, any help with the problem would be much appreciated. Here is the unsatisfactory code I have so far: [CODE] … |
|
Hi I need to animate user defined algorithms and I have a myGraph class. The dfs() and bfs() will go into the user-defined algorithm the user types and saves in a text-editor included with my program. I am checking the adjacency matrix to know if two vertex are connected by … |
|
I've found a simple script (at [url]http://www.javascriptkit.com/script/script2/bodymass.shtml[/url]) that determines someone's BPI that I'm now trying to alter to fit my basketball workout program. Been trying all day, can't figure it out... If anyone can help, thanks a ton. Their formula is as follows: [CODE] <FORM NAME="BMI" method=POST> <TABLE border=1> <TR> … |
|
circle.h [code] // // circle.h // defines the functions to draw circle. // #ifndef CIRCLE_H #define CIRCLE_H #include <windows.h> typedef struct tagCircle { int x; int y; int radius; } Circle; /* set the window handle */ void SetWindowHandle(HWND); /* set pixel @parms int x xposition @parms int y yposition … |
|
I want to know the meaning of Google Algorithm. If possible then provide me effective tutorial or any material from which I can understand it well. |
|
hello all i have a directory in which a lot of log files are there which are text files.i want to search a particular no in all logs and want 4 fields of logs corresponding to that no. for tht i am using a script in which i am cutting … |
|
[B]This is a homework question[/B] I am attempting to write a hash function that will evenly distribute 20 randomly selected census name into 20 buckets. I may have up to three collisions of two each. [CODE] public int hashCode(Contact c) { // TODO Auto-generated method stub int result = 0; … |
|
Hi I have to develop an algorithm visualization tool for my project. I divided my tool into these 4 modules below: [QUOTE]The tool will be divided into 4 modules: -The GUI -The Visualisation module -The Calculate module -The Compile module The GUI the GUI class is the class that forms … |
|
I'm trying to write a program that can win a Battleship game in fewer than 60 guesses. Since the Battleship game that I am writing this for uses a 10x10 array, I thought that first of all I would just try to win the game in 100 guesses before I … |
|
Hello. Me and some of my friends at college were assigned a practical task of developing a net application for optimization of cutting rectangular parts from some kind of material. Something like apps in [URL="http://www.freedownloadmanager.org/downloads/cut_optimization_software/"]this[/URL] list, but more simplistic. Basically, I`m interested if there is any source code for this … |
|
hello someone out there...help me with algorithm to determine range of marks!! here is my code so far [ICODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> struct stumarks { int studentid; int progassn; int lab; int test; int exam; char seperator; double finalmark; } stumarks[9]; using namespace std; int main() … |
|
HI I am working on a project to animate user-defined algos. I am still at the very beginning but I am practicing code in swing and here is an Array class that the user can use in his user defined algo: [CODE] import java.awt.*; import javax.swing.*; public class Array1 extends … |
|
Hey guys, I'm making a 3d engine for html5 (canvas) but I have some problems well here is my code for the html document engine3d.html [code=html] <html> <head> <script src="engine3d.js" language="JavaScript" type="application/javascript"></script> <script type="application/javascript"> function init() { //creating canvas canvas=document.getElementById("canvas"); ctx=canvas.getContext("2d"); ctx.beginPath(); color3(ctx,0,.5,0) ctx.moveTo(0,horizonZ) ctx.lineTo(500,horizonZ) ctx.moveTo(0,startZ) ctx.lineTo(500,startZ) translate3WithoutRotation(ctx,100,0,1) vector3WithoutRotation(ctx,100,0,90) vector3WithoutRotation(ctx,200,0,90) … |
|
Hello, I got stuck trying to solve the following problem in Python. I understand that I somehow need to implement Dijkstra's algorithm to solve this problem, but how I've no idea. [B]Inside a room, there is a monster with N heads, and a human (with 1 head). The human has … |
|
Hi! I want to know, how to calculate running time complexity of a given code or algorithm. some one please help me. code is given below. x = 0; for (a=1;a<=n;a=a*9) { for (b=1; b<=3n; b++) { for(c=0;c<n; c=c+5) { x++; } } } I think, there is for the … |
|
Can anyone tell me what is "mutual exclusion" and give a simple algorithm for it?? |
|
Hi, I am trying to develop an efficient algorithm for maximum subsequence sum. But I am stuck. I want to return the start and the end of the subsequence producing the maximum sum. Example Array Contains... -2,11,-4,13,-5,-2 Now my algorithm works as follow. [CODE] MSS(Array[],N)//Where N is the number of … |
|
Hi I have a project in which I have to build an algorithm visualization tool. Up until now I have been going in a static direction thinking of having in built menus that allowed a user to create an animation of a sorting algorithms but now my tutor wants me … |
|
Hi all, Ok, a little bit of background before I start. I am working on some 2D visualisation software to show a cross-section of a magnet yoke with colour coded sections showing the force. The diagram has 10 discrete colour sections, not a continuous blend of colour. The data I … |
|
Hi guys, am working on ATM user authentication using finger-vein patterns captured with a CCD camrea, Randon transform for feature extraction, and the Radial Basis Network and Probabilistic Neural network for classification. Pls I need help with the java programming aspect. |
The End.