3,815 Topics

Member Avatar for
Member Avatar for jmcorpse

Hello, Can some one give me a hand on my search algorithm? I know it's not working right and am not sure how to make it work properly. It is on line #'s 69 to 73. It has to search for the name that is already stored in the array …

Member Avatar for Agni
0
340
Member Avatar for z1ggy

Hey everyone, I currently am creating a Card shuffling program in C++, Ive taken care of the shuffling of the deck. Now I just need to distribute a hand of 5 cards, and determine hands. Can anyone help? Please! cardheader.h ( includes both Class Card & Deck ) [CODE] #ifndef …

Member Avatar for z1ggy
0
2K
Member Avatar for salty11

I need some help with this program, im obviously not so good with this stuff, but since this is the only one i haev left to make i thought i would ask some of you guys for help the problem is: Write separate programs to do the following: 1) Convert …

Member Avatar for mrnutty
0
255
Member Avatar for SabinIvy

Okay I have tried everything to alter the code but nothing works, so I ask for your help. The thing is I am trying to turn my code from this: *______* **____** ***__*** ******** ***__*** **____** *______* into this: *________* **______** ***____*** ********** ***_**_*** **__**__** *___**___* ____** ____** ____** ____** …

Member Avatar for VernonDozier
0
446
Member Avatar for Tiancailee

Hi i am trying to think of how the algorithm of how this question works but no matter how hard i tried, i cant think of it. Can anyone give me a hand?? Any help or tip would be greatly appreciated. Question: Given 3 classes, equilateral triangle, isosceles triangle and …

Member Avatar for Fbody
0
188
Member Avatar for ShawnCplus

As the title says: Is the XOR Swap algorithm still viable? I know that temp-swaps are supposedly faster but the shear coolness of an XOR swap makes it more attractive to me. What do you guys/gals think? For anyone that doesn't know what an XOR swap is here goes [code=c++] …

Member Avatar for arkoenig
0
232
Member Avatar for Toxic_Rice

Hello, everybody! I am kind of new to the forums, and I will do my best to follow the rules when posting a new thread. I am to create a program that is supposed to generate 30 random integers between 10 and 200, and insert them into a Heap. The …

Member Avatar for Toxic_Rice
0
237
Member Avatar for Joey_Brown

Hello. I have encountered a following problem "find all duplicate letters in a 2d char array and replace them with '@'" So for instance if I have this : a a b c The output would be @ @ b c So. I have come up with the following algorithm …

Member Avatar for Joey_Brown
0
125
Member Avatar for NinjaLink

I am using dijkstra's algorithm to try to gather fake street names and find the shortest path. However, I can only get numbers to work instead of strings... The example of my results is below. [B]Results:[/B] The shortest route from 0 to 1 is : From Street 0 to Street …

Member Avatar for pritaeas
0
165
Member Avatar for TotoTitus

Hello everyone, I am doing a graphics app in C# for a school asignment. I have to make some geometric 3D figures spin around, translate and scale, not too much of a deal, i guess. But there is an issue i do not know to solve: When switching from 'wireframe' …

Member Avatar for TotoTitus
0
274
Member Avatar for crisabraham

I am doing a project on developing a one time password system. In that, I have to encrypt a counter value and secret key together by HMAC SHA 1 algorithm. But the counter value and key need to be stored very safely on the server. Is there anyway by which …

Member Avatar for JamesCherrill
0
125
Member Avatar for mansace

I have this code where I have to implement binary search by first using the selection sort algorithm in mips My selection sort works but trying to use the sorted list to execute a binary search is where my problem comes. I get an error saying is out of range. …

0
64
Member Avatar for eliezahorre

hi, so i've been looking for a string matching algorithm that gives me a "rating" based on how close the 2 strings match.. luckily, i googled and read this article: [URL="http://www.catalysoft.com/articles/strikeamatch.html"]how to strike a match[/URL] here's the original java class code [CODE=java] package strike_a_match; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; …

Member Avatar for eliezahorre
0
1K
Member Avatar for aanders5

Ok, I have two pieces of code, this is my FIRST time ever trying to do a SPIM coding, so forgive me if this is a total trainwreck. :) [B] I will FIRST post the question, along with pseudo code of what it is suppose to do. THEN I will …

0
85
Member Avatar for t_mac219

Hey guys. I'm writing an heap-sort algorithm (code is below) but for someone reason my restore_heap function is incorrect somewhere. I understand how the algorithm is working. do y'all have any suggestions? #include <iostream> #include <stdio.h> #include <vector> #include <cmath> #include <ctime> #include <algorithm> using namespace std; # if 0 …

Member Avatar for t_mac219
0
134
Member Avatar for alainigban

[CODE]#include <iostream> #include <string> using namespace std; int GCD(int x, int y); int main () { int ans, num, a, b, c, d, e, f, g, y; int h = 0; int w = 0; char ans2; char ans3; cout << "[1] Math algorithms " << endl; cout << "[2] …

Member Avatar for Fbody
0
249
Member Avatar for jl.lakhnai

Can someone please help me calculate the time complexity of this loop? (Toggle Plain Text) for(i = 1; i <= n; i = 2 * i) for(j = 1; j <= i; j = 2 * j) for(i = 1; i <= n; i = 2 * i) for(j = …

Member Avatar for apines
0
151
Member Avatar for IMtheBESTatJAVA

I've recently taken up an AP Computer Science class online for Maryland State education at my high school, and was wondering if I could receive help on a few of the projects. Most of them are simple like programs I made in Visual Basic for my first programming class with …

Member Avatar for camcamcam
0
313
Member Avatar for burcin erek

I made a simple color finding game. the problem is that my color input guess is not good so complex I want them in one line and also I want to see my tries at certain places. can you help me thanks in advance. [CODE]#include <cstdlib> #include <iostream> #include <string> …

Member Avatar for mrnutty
0
137
Member Avatar for cwarn23

Hi, I have just started python as after a chat with a friend I have discovered it would be the most suitable language for my latest project. The problem I have come across is I need a sha1 function written in python. I don't want to use the built in …

Member Avatar for cwarn23
0
173
Member Avatar for ntaraaki

Can you please suggest an algorithm that uses pointers and I also have to read and save the text file, which I#m having trouble with. Here is a rough translation of the task into English(I used google translator so it's bit jumbled, my german's not that good): Define a structure …

Member Avatar for geojia
-1
232
Member Avatar for zoltan.magyar

I am an absolute beginner to programming. I started a programming course recently. I have a task which basically involves coding a first fit algorithm. The task is to design and implement a program to pack items into containers using first fit algorithm. A container has an arbitrary capacity. The …

Member Avatar for TrustyTony
0
81
Member Avatar for gheorghe gardu

Hello, I would like to ask if you can give me some help. I have to implement a slicing tree that represent a slicing floorplan(slicing floorplan divides a rectangle with horizontal and vertical cuts, and can be represented by a binary tree, called slicing tree. Its internal nodes are the …

0
61
Member Avatar for sijothomas

Dear friends ....... I am doing a biometric project , so i need a Finger print recognition algorithm and its code in java....... So i request you to help me............ Anyway thank you May GOD bless you Thanks in advance.

Member Avatar for masijade
-1
57
Member Avatar for sijothomas

Dear friends ....... I am doing a biometric project , so i need a face reconition algorithm and its code in java....... So i request you to help me............ Anyway thank you May GOD bless you Thanks in advance.

Member Avatar for masijade
0
73
Member Avatar for mhaviv

Hi all, I have written a simple function to compute factorial in C++. It computes OK until 31! which is 738197504. Now for factorial 32 it gives me a negative result and for 34 it gives me 0. I know that on my machine LONG_MAX is 2147483647. So in my …

Member Avatar for NathanOliver
0
92
Member Avatar for Kremlan

I'm supposed to modify this method ([url]http://pastebin.com/6xF1pN51[/url]) to this (translated): "A faster algorithm to compute the average can be done by looping through the entire image in two passes in each session and make a one-dimensional mean value. In the first pass compute the mean value of the y-axis (one …

Member Avatar for quuba
0
148
Member Avatar for rohit_static

Hi, I was trying to code the shell sort algorithm ,which compares data over distances of n/2,then n/4,n/8 and so on till the array finally gets sorted .As far I understood I implemented the code as follows but it doesn't seem to work.Can someone help! here is the c code[code=c] …

Member Avatar for Adak
0
191
Member Avatar for precila

**Write a algorithm to accept 5 number and sort it in the ascending order using selection sort** #include<iostream.h> #include<conio.h> class selectionsort { Int a[100], n, i, j, temp, loc, min ; public: void in( ) ; void out( ) ; selectionsort( ) { Min = a[0] ; } }; void …

Member Avatar for geojia
0
194
Member Avatar for mindbend

Hello people, I decided to make a family tree as a graduation project, I've thought about multiple ways to make it, but I like some fresh ideas, in case i forgot some things. I'm trying to keep the project as easy as possible, because in the end I will need …

0
151
Member Avatar for bookmark

For lines 23 and 22 it says "you cannot assign to a variable that is constant." anyone know how to fix this? thanks in advanced, bookmark. [CODE]#include <iostream> #include <string> #include <algorithm> using namespace std; void print (const string & s); string reverse(const string & s); int main(){ print("blah"); reverse("blah"); …

Member Avatar for alaa sam
0
153
Member Avatar for hmdb
Member Avatar for dennisme

Environment: eclipse I have reached a snag with finding the perfect numbers from 0 - 1000 while using methods with multiple perimeters, one project, tow classes. There is an example on this site from quite a while ago within one single class. That is in a later chapter in my …

Member Avatar for jon.kiparsky
0
355
Member Avatar for amatech

Hi guys, can anyone help me determine the step counts of the following instructions in terms of n? for i = 1 to 2 * n j = i + 1 while j >= 1 j = j – 1 Thank you!

Member Avatar for geojia
0
1K
Member Avatar for .:Pudge:.

I am having trouble printing the contents of a b-tree of order 'n' in level order. I have looked at algorithms online, but they only cover trees that have nodes with only 2 children. Shouldn't it also be called recursively? No algorithm I found used recursion. [CODE]void addToQue(struct node *root) …

0
54
Member Avatar for Malaisary

Hello, I want to sort a 2dim array by columns, but there is an error in my code. It doesn't accept value of element from 2dim array into C[x]. Can anybody help please? [code=C++] static int counting_sortx( int** A[], int** B[], int k, int rows, int col){ /*Array A[ ] …

Member Avatar for jakoub
0
206
Member Avatar for mrnutty

[B]Problem statement:[/B] Give two sets [TEX]A[/TEX] and [TEX]B[/TEX], devise and algorithm that checks if A and B are [URL="http://en.wikipedia.org/wiki/Disjoint_sets"]disjoint[/URL]. The following information are given about the set [TEX]A[/TEX] and [TEX]B[/TEX]: [LIST=1] [*][TEX]|A| = |B| = n[/TEX], that is number of elements in both sets are n [*]A and B are …

Member Avatar for arkoenig
0
102
Member Avatar for oggiemc

Hi, The following code works fine: [code=c] // main.cpp #include "Dog.h" void details(Dog x){ cout << x.height << endl;} int main() { int h,w; vector<Dog> vect; cout << "Please enter 3 dogs measurements: "<< endl; for(int i=0; i<3; i++){ cout <<"\nInput height:" <<endl ; cin>> h; cout <<"Input weight:" <<endl …

Member Avatar for oggiemc
0
143
Member Avatar for hazeeel

Hey guys! Much help needed here! I am a student doing a protein structure alignment algorithm which is my final year project, using various forms of translation, rotation & computing the RMSD. From line 164: This is my loop calculation, basically it computes the Root Mean Square Deviation (RMSD) of …

Member Avatar for hazeeel
0
178
Member Avatar for kyros

[COLOR="Red"]I have an assignment from my data structures course.We learn almost nothing about C++.But they gave that assignment,and said do it anyway.Many of my classmates have it done with money.But I wanna learn how to make this project by myself.I'm thinking about the structure for 5 days and nights.I wanna …

Member Avatar for hiddepolen
0
760
Member Avatar for nikilvarma

Hello This is Nikil.Can anyone help me out how to calculate time and space complexity of an algorithm with examples.I am in very much need.Please help me out in detail.

Member Avatar for Dhruv Gairola
0
155
Member Avatar for br0wnm4n

Hi, I am having some trouble writing this code. The question is as follows: The Sieve of Erastophenes is an algorithm -- known to ancient greeks -- that finds all prime numbers up to a given number n. It does this by first creating a list L from 2 to …

Member Avatar for TrustyTony
0
142
Member Avatar for jon.kiparsky

Most of the posts here are from people with problems, looking for help. I thought I would try to talk a bit about ways to find your way out of "stuck". It's been on my mind lately, since I've been wrestling with Swing and it's been winning. Finally worked out …

Member Avatar for apines
1
127
Member Avatar for yap_1991

Hi all I have a empty GUI , what i need to do now is to put the algorithms I have into the GUI. Im not very sure how im supposed to go about doing it. Calling of files would be easier to me as i do not have to …

Member Avatar for JamesCherrill
0
209
Member Avatar for TGeorge824

Hello, I have an assignment where we are supposed to populate an operating system's ready queue with processes and try various process scheduling scheme and record their wait times. To do this i made a rudimentary structure for a process: [CODE]typedef struct{ int ID; int wait_time; int exec_time; }process; [/CODE] …

Member Avatar for TGeorge824
0
155
Member Avatar for igata.isa

Hi every body, I have implemented simple k-NN (without features weight) machine learning method. Now I have to implement k-NN with features weight. I chosen ReliefF machine learning method to weight features. Are there someone tell me the way to implement ReliefF to weight features? I had a 1000 instance …

0
52
Member Avatar for G-Do

Hi guys, I'm trying to learn the principles of artificial intelligence. I just finished coding up a belief net and a corresponding EM algorithm that learns the CPTs for latent nodes using training data (if you're unfamiliar with the lingo, you're probably going :eek: right now). While the program (written …

Member Avatar for Gael Varoquaux
0
332
Member Avatar for jarejaa

Hello there I am implementing heap sort by maintaining min heap property. It is working fine but the order is descending, I want ascending order. One way is to invert the output array and get the desired output but this is not what I want. Like in min heap root …

0
65
Member Avatar for celiz45

can anyone please suggest few algorithms to predict protein structure - topic may come under datamining in bioinformatics

Member Avatar for swinefish
0
66
Member Avatar for jvibez

write a pseudocode algorithm tp prompt the user to enter a number and it should tell if the number is odd or even.........i need help

Member Avatar for daviddoria
0
49

The End.