3,815 Topics

Member Avatar for
Member Avatar for rakeshroxx

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 …

Member Avatar for Salem
0
61
Member Avatar for ocirn3

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..

0
54
Member Avatar for sarah1981

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 …

Member Avatar for neuronimbus
0
132
Member Avatar for shamila08

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] << …

Member Avatar for stilllearning
0
108
Member Avatar for shamila08

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 …

Member Avatar for shamila08
0
211
Member Avatar for shamila08

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 , …

Member Avatar for shamila08
0
121
Member Avatar for cat08

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 …

Member Avatar for Nick Evan
0
85
Member Avatar for emk4

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 …

Member Avatar for emk4
0
158
Member Avatar for chunalt787

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

Member Avatar for chunalt787
0
114
Member Avatar for princess_19

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, …

Member Avatar for ithelp
0
99
Member Avatar for GrimJack

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?

Member Avatar for dickersonka
0
75
Member Avatar for mzdiva041986

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] …

Member Avatar for Duoas
0
83
Member Avatar for Congartis

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 …

Member Avatar for Congartis
0
651
Member Avatar for sanfan49er

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 …

Member Avatar for Alexpap
0
171
Member Avatar for basslover

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 …

Member Avatar for LizR
0
1K
Member Avatar for pads

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 …

Member Avatar for MelechM
0
149
Member Avatar for Jake1164

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 …

Member Avatar for vbguru2008
0
1K
Member Avatar for itseeker87

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 …

0
76
Member Avatar for dallas81

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. …

0
59
Member Avatar for Alex Edwards

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 …

Member Avatar for Narue
0
3K
Member Avatar for jpc0tte

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.

Member Avatar for jpc0tte
0
109
Member Avatar for Hannahlv

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 …

Member Avatar for LizR
0
201
Member Avatar for Gentile

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 …

Member Avatar for vijayan121
0
119
Member Avatar for shamila08

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 …

Member Avatar for shamila08
0
285
Member Avatar for coveredinflies

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 …

Member Avatar for Sky Diploma
0
124
Member Avatar for mfareed

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 …

0
54
Member Avatar for tspj20

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 …

Member Avatar for ArkM
0
124
Member Avatar for DLDude

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 …

Member Avatar for LizR
0
157
Member Avatar for basukinjal

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 …

Member Avatar for ArkM
0
124
Member Avatar for freude23791

Can u help me on converting ascii to decimal.... I've used the algorithm in the readint procedure but it doesn't work.

0
55
Member Avatar for omoz4real

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 …

Member Avatar for ahyeek
-2
103
Member Avatar for boradbhavesh

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 …

Member Avatar for Salem
0
88
Member Avatar for CoolGamer48

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 = …

Member Avatar for ArkM
0
245
Member Avatar for swamy kavitam
Member Avatar for Salem
0
61
Member Avatar for gregorynoob

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 …

Member Avatar for ArkM
0
104
Member Avatar for Elmo_loves_you

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 …

Member Avatar for Elmo_loves_you
0
80
Member Avatar for Clockowl

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 …

Member Avatar for Clockowl
0
210
Member Avatar for aalhamad

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 …

Member Avatar for ArkM
0
92
Member Avatar for masterjiraya

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 …

Member Avatar for iamthwee
0
122
Member Avatar for arun_lisieux

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) …

Member Avatar for arun_lisieux
0
212
Member Avatar for gregorynoob

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) …

Member Avatar for gregorynoob
0
706
Member Avatar for gregorynoob

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 …

Member Avatar for RemoB
0
81
Member Avatar for BradenMurphy

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 …

Member Avatar for BradenMurphy
0
189
Member Avatar for brizhou

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: …

Member Avatar for ssharish2005
0
159
Member Avatar for sidatra79

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 …

Member Avatar for ivailosp
0
90
Member Avatar for Clockowl

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 …

Member Avatar for Prabakar
0
383
Member Avatar for CoolGamer48

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 …

Member Avatar for CoolGamer48
1
135
Member Avatar for death_oclock

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) + …

Member Avatar for chaosprime
0
159
Member Avatar for andy4919

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 …

Member Avatar for andy4919
0
264
Member Avatar for SHWOO

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 …

Member Avatar for SHWOO
0
174

The End.