3,815 Topics
![]() | |
given an array E.The first n cells of the array contain intergers sorted in increasing order.The remaining cells all contain some very large integer that yu may think of as infinity(call it maxint) .The array may be arbitrarily large(you may think of it as infinite),and you dont know n.Given an … | |
we're trying to find an algorithm for the computer opponent move generation... do you have any suggestion on which algorithm should we use.... please help us.. thank you.. | |
It's seems google changed its algorithm. I promoted my site with hyperlinks I've bought in couple of directories. I'm using this [URL="http://www.exactfactor.com/"]SEO tool[/URL] to track my jewels website. and I see its positioned is downgraded in Google (with many keywords). some SEO expert told me text anchor is less significant … | |
Hello, dear all! Below is heap algorithm. the problem is the output is not appear. How to fix it? [code=cplusplus] #include <stdio.h> #include <iostream> using namespace std; int *Value; int N; void read (int N) { int i; for (i = 0; i< N; i++) { cout << Value[i] << … | |
hello, dear all, i have a slightly problem with my assigment algorithm as follows: [code=cplusplus] void write( int *x, int n) { if (x != 0) { for (int i = 0; i < n; i++) { printf("%4d", x[i] ); } printf("\n"); } } // print void swap(int *x, int … | |
Hello, dear all. My algorithm as follows. my input is in Code2D.h file. actually i have to put in file 'Code2D.in'. but i dont know have to create it. By the way, my algorithm have no problem with N <= 4. but when i change N = 5, 6 , … | |
Please give me the code as well as the algorithm for the following 3 questions, 1) To generate the following pattern using 'for' loop. 1 2 3 4 1 2 3 1 2 1 1 2 1 2 3 1 2 3 4 2)Write a program to take N array … | |
Hi, i've a problem about load and parse a large array block on my dictionary-like app. My app will load mytext.db to its array. App users entered specific text to txtIn, press cmdSearch and get the translated ones. The main issue is scanning speed, load array speed and match input … | |
Hey does anyone have a basic binary multiplication function and or algorithm? I just need to record run times on it for varying amounts of input and don't want to have to spend an hour doing a solved problem for 5 points on a HW. Thanks in advance | |
Sorry 4 bothering you guys... its that im a beginner at this... they gave me a problem but I dont know how to interpret it, it says as follows: [i]The Babylonian algorithm to compute the square root of a number n is as follows. (1) Make a guess, say g, … | |
Is there an algorithm for normalizing data? I think I understand the process but how do I know when I have drilled down to the bottom? | |
Help me improve this algorithm please, as of now it is calulating the rows of Pascal's Triangle but I need it to calculate the colums and stop at (3,1). for n:= 0 to k do for m:= 0 to n do if m=0 or m=n then A[n,m]:= 1 else A[n,m]:=A[n-1,m-1] … | |
Greetings! My task is to impement [url=http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] by mapping floats to integers, but be able to draw lines of any slope, including horizontal (zero slope) and vertical (infinite slope) lines. (The near-bottom of the page has an integer-only version of this.) My implementation of the linked pseudocode works … | |
CIS350 Project Choose one O(n log n) and one O(n2) sorting algorithm. Choose a third algorithm of any time complexity. For each of the three algorithms you have chosen, implement the algorithm. Then, write a short piece of code that will generate the following: 1. A file of 1000 random … | |
I have mini project about client-server connection and i'm using TCP Socket to do a connection. The server wants to know if a client has a 'notepad.exe' application running on the client machine. I already have list of running process on client machine, and i have an algorithm to detect … | |
Hello everybody I am from Commerce Background doing some IT stuff got some problem by professors.. Can someone solve this problem thanks.. Program Specification: “The body mass index (BMI), or Quetelet index, is a statistical measure of the weight of a person scaled according to height. The body mass index … | |
I converted TGREER's C# implementation of a hacked StreamReader class to VB.NET and wanted to provide it for anybody who has run into the following issue: when using a [B]StreamReader[/B], and [B]ReadLine[/B], to process a text file, you cannot determine where you are "at" within a file. The following is … | |
Hi, I hav a problem at hand...plz help out. I am not allowd to compuet o(n)...i need to compute the algorithm in O(log n). Suppose there is some number N, and there are 7 elements in another array. Each element in the array is given another special number(one number per … | |
Hi all I am new to this forum and I am having problem using the sort algortihm. My code is suppose to allow the user to enter in fractions and then sort what is entered into the array. The fraction class is only contains the public field numerator and denominator. … | |
I was tinkering around with code in C++ last night trying to make a template algorithm that would be evaluated at compile time and also print information. Unfortunately, because std::cout and std::cin are references to objects and they aren't considered built in types (directly at least), I suppose the compiler … | |
Hi everyone...did anyone know any genetic algorithm in Vb.net syntax for the generation of time tables. It is meant for a secondary schools. | |
using System; using System.Collections.Generic; using System.Text; namespace EnsembleAnalyzer { /// <summary> /// Tool to calculate and add CRC codes to a string /// /// *************************************************************************** /// Copyright (c) 2003 Thoraxcentrum, Erasmus MC, The Netherlands. /// /// Written by Marcel de Wijs with help from a lot of others, /// especially … | |
I am trying to come up with a good class design to deal with asynchronous data to be stored and analyzed over multiple time frames. I obtain data elements from an asynchronous data source (i.e. the data arrives at irregular time intervals) and wish to place them in a container … | |
Hello, everybody! i have a problem with permutation array. most algorithm related to permutation, list down all permutation for n!. however, i would like to generate c++ output as follows: 1234 1243 1342 1324 1423 1432 which is we fix the element '1', and cycle others. and soon. i hope … | |
Hi, I have copied the quicksort algorithm out of my text book, but it isn't working properly and there are no compiler errors so I am struggling to debug. it is partially sorting so I think it must be one of the conditional statements or something not declared how I … | |
Can somebody help me with the CRC (Cyclic Redundancy Code) algorithm implementation given below: There is a three byte packet header. <--------1st byte-----><--------2nd byte-----><--------3rd byte-------------> --------------------------------------------------------------------------------------------- | 8bits | 8bits | 3 bits| 5 bits (CRC ) | --------------------------------------------------------------------------------------------- for example: 0D 0B 40 ---> Input Data stream ( 19 … | |
I have an arbitary vector where I have to try all combinations (sum up different combinations) of elements within the vector. I want to use recursion for this but I have trouble in coding that. I have tried something similar but with a fixed vector size, using for loops. But … | |
Hi, I'm trying to write a very simple program to graph data via Bluetooth accelerometer (which runs on COM6). All I need is for it to take ASCII datathat comes into Hyperterminal like this: Y=2.316 Y=2.283 Y=2.233 Y=2.216 Y=1.850 Y=2.033 Y=2.016 Y=1.833 Y=1.633 Y=1.516 Y=1.283 Y=1.200 to then be graphed … | |
Suppose i have a random permutation of 0,1,...., N-1. Now if i want to get the identity mapping from this can i do anything better than sorting?? I mean, sorting does not take into fact that all nos from 0 to N-1 are in the array or not. But in … | |
Can u help me on converting ascii to decimal.... I've used the algorithm in the readint procedure but it doesn't work. | |
Hi everyone, I was wondering if anyone could help me solve the popular 8 puzzle problem in C# using the A* algorithm or using the manhattans distance heuristics. actually i know the theoretical aspect of it but programming it is a little bit more difficult for me though i have … | |
I got following algorithm for finding permutation but I can't code it. Can any one can code this permutation algorithm in c++ using recursive method as below [I]bool nextPermutation(int array[])[/I] 1. The first permutation is the permutation represented by the sequence (1, 2, …, n). 2. The last permutation is … | |
Hey I'm writing a color class, and I want to have a constructor that can take in an unsigned int like 0x00FF00FF and interpret it as fully opaque green. I have code for that (I think it should work, could someone check it?): [CODE] rzb::color::color(unsigned int hex) { m_red = … | |
can any one give code for cpu scheduling algoritms (fcfs ,rr srtf,priority) in c | |
the problem is to find the minimum numbers to be popped from an array to make it sorted. so for example 12534756, you can pop all but one, but it's best to pop 5 and 7 cause it's the least needed to make it sorted. I'm having difficulties finding a … | |
Hi Everyone, I know this sounds silly but Ive been so caught up with designing efficient logins that interact with a database that Ive forgotten how to do it the hard coded way. I have to create a little application that interacts with a database, but it doesnt have to … | |
Hey guys, I've written quite a large piece of code the past few days, and today I've cleaned it up a bit, divided it into functions (I know, bad, should've done it the other way around) etc. etc. The project is a simple 3D thingamadingy, the program is able to … | |
I have a line to pharse like this: 1.2 2 3 4 5 2.4 2.4 2.6 3.5 5.6 3.7 3.4 4.7 3.4 56 I need to sort them in a map of string and vector<double> The problem I'm having is I'm trying to get each colum and store it in … | |
I feel that all or almost all of the stack arrays needs a stack header... well this is the project target... I need to input a postfix algorithm an check whether it validates or not... I'm not very familliar with headers could some one suggest it for me or make … ![]() | |
Hey ppl, I was browsing thro the topcoder sample problems and came up with this one. Plz suggest some good algorithm for this. Problem Statement Note: Please keep programs under 7000 characters in length. Thank you Class Name: SquareDigits Method Name: smallestResult Parameters: int Returns: int Define the function S(x) … | |
given x and y (the field dimensions) and x*y numbers, (pieces of cheese on each square) calculate the best way for the mouse to get from (1, 1) to (x, y), he has to get as many cheese as possible... also you can only move closer to the (x, y) … | |
I guess there is a "standard" algorithm for problems of this type.. the template would look like this: given the integer n and n numbers, find the smallest sum you can get by adding the numbers like this: n1+n2+n1+n2+n3+n1+n2+n3+n4... the obvious way for me was to do some math on … | |
Hi for my assignment i have to create my own greater than operator for a string class. Basically the class acts as the std string class library but i gotta edit the greater than operator in it. The assignment says upper and lower case should be treated as equal eg … | |
A programmer has been asked to implement a simple game that requires the use of a board to position and manipulate some objects represented by symbols. The programmer has implemented the board as a two-dimensional array of characters. The following constants have been declared as global to the whole program: … | |
Does anybody have any idea why the following code causes a memory error? Thanks everybody in advance :D [code=CPP]#include <stddef.h> // some older implementations lack <cstddef> #include <time.h> #include <math.h> #include <stdlib.h> #include <vector> #include <algorithm> #include <list> #include <deque> #include <set> #include <iostream> #include <iomanip> typedef double element_t; using … | |
Hey guys, I'm parsing this WaveFront .obj file, still (for those that have read the previous post), but it has some really weird error in it that I haven't seen in a program before. The parsing algorithm starts out like this: [code]Open the file in textmode. Get filesize Allocate buffer … | |
I'm writing a program for a contest (it's a demo, not the actual thing - so I'm not cheating by asking for help - and my question isn't directly related to the algorithm they want anyway). To submit a program, you send them the .cpp file, and they execute it … | |
I am using DirectDraw to make a game and I am running it in 8-bit color mode. What I am having a problem with is making a macro to convert RGB values into a single 8-bit color. Here is the macro: [CODE=c++] #define RGB_8BIT(r, g, b) ((r & 224) + … | |
I have to create a Pseudo code for a class that is it's second week (I registered Late) I have no idea what I am doing. I have to create a program that writes a file that lists student ID #'s and their final scores. This is the data I … | |
I am trying to print a two-dimensional array to the screen. My algorithm probably isn't correct but I am having trouble even getting the process to work. on the call I get ----error A2206: missing operator in expression This line add ebx,tmpRowSize * rowIndex I get ------error A2026: constant expected … |
The End.