3,815 Topics
![]() | |
i want to know the sequence of values tobe printed out by this algorithm count = 0 while(count<2) print the value of x x=x+2 else print the value of x my answers are as follows 0;2 i need clarity | |
Hello, I started my homework and I couldn't complete it. Can anyone help me with it?? the question is: Implement the depth-first search algorithm so that it accepts input from text file in the following format: List all distinct vertex symbols (use just a single symbol: A-Z and 0-9) one … | |
[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDING", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; // words that will be randomized. string hint[16] = {"Small colorful fish.", "A machine … | |
Hello, I am creating an implementation of LIST that displays a list of 4 elements and also displays them in reverse. It seems to be correctly displaying the first list but I am getting a segmentation fault error before it displays the reverse list and I am not sure why. … | |
Hey all, I'm currently working on a project that exemplifies matrix multiplication algorithms. My problem isn't working on the algorithms, but more of the structure of the classes. If any of you wouldn't mind looking over my code and helping me get a little more familiar with how things should … | |
I am in need of dire help. My Yahtzee game is due in class on Wednesday. My computer recently crashed and deleted my visual studios 2010 with all of my Projects that I have done. Luckily I had a back up file on my flash drive. Sad thing is though, … | |
eish am strugling with this binary tree.huffman code and i ave an assignment,have a look on that You are given a text file. Any printable character, including digits and punctuation can be present in the file. Newlines and blank spaces can be present as well. Your job is to write … | |
Hey, I have a function, though it's not working as it should be. My program is Dijkstra's algorithm, and I am trying to build a list of a node's nearest neighbours using info contained in a text file of the network (7 nodes in this case), in the form: 0,2,4,1,6,0,0 … | |
[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; static const char Y= 'Y'; static const char N= 'N'; char ans; … | |
[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; static const char Y= 'Y'; static const char N= 'N'; char ans; … | |
friends i am doing BS(it) i want simple and easy answer for this questio can anyone help me. what is algorithm explain it?analysis of algorithm? | |
Hello guys, I am doing my final year project on data mining using the privacy preserving techniques of genetic algorithm. I am struck on how to implement the crossover of the chromosomes(transactions). Anybody having the idea of the code in C# ,please please send it. | |
i want to know what will be the sequence of values to be print out for the following algorithm using trace table count=1 count=count + 1 while(x<2)prin the value of x elseprint the value of x My answers is 0;2;2 idon't know if they are correct | |
i have a simple question: I want to define a hex character array in C, but I don't want to have to define the elements one at a time. my programme needs an hexadecimal array as input of 128 bits. for example, [code=c]unsigned char temp2[32]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 … | |
Hi folks! My friend just asked me to code a program which detects ellipses of an image. The images he will use with this program have 2 different kinds of pixel values - black (0) & white (255). So I researched a bit and found an algorithm for ellipse detection … | |
[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; // Functions int instructions(); int game(); //Types and Arrays string word[] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; char inst[50]; int main() { cout … | |
Hello, I have some code that passes arguments between functions, though I am failing to understand why my code isn't working. This is the relevant section of my Dijkstra's algorithm code: [CODE]def network(): f = open ('network.txt', 'r') network = [[int(node) for node in line.split(',')] for line in f.readlines()] print … | |
Hello, I am having some trouble in working out the distance of each node from the starting node in my Dijkstra Algorithm code. Here is my code with the section i'm stuck on in bold: [CODE]infinity = 1000000 invalid_node = -1 startNode = 0 class Node: distFromSource = infinity previous … | |
I have two files; one with places then the distance between them. Example: Moffat Carlisle 65 Doncaster Hull 76 Northampton Birmingham 90 Leicester Lincoln 82 Sheffield Birmingham 122 I was wanting to use dijkstra's method, but i seem to have a problem because looking pseudo codes to understand it they … | |
Hi, I need serious help with this code. So far everything compiles correctly but it does not output the correct change, and I've been trying for hours to figure out how to remedy the situation. All help is appreciated. This is what is being inputed: 4 1.00 .01 100.00 .01 … | |
I have trouble saving my numbers. I used an array for my saving feature. As you play the game, the computer asks you if you want to save a number. you say yes and you pick which number(s) you wish to save. My problem is, if i save 2 numbers … | |
Hi, i was hoping that someone could help me understand what graph isomorphism is and what are some of its practical application examples ?? i really don;t get it, and is it possible to code it in Java (what i mostly see is only in C or C++)... | |
Hey guys, I'm making a global operator, and I have a line where I'm comparing a std::string::difference_type to a std::string::size_type, I think the difference_type is usually a signed integer, and the size_type an unsigned.. Any ideas for an algorithm change? Also, there is a lambda function used I would like … | |
Hello. What i'm trying to do is simple and I know that I could just get the answer offline. However, I wanted to finish this one myself, so if someone could fix what I believe to be a small error I would appreciate it. I am simply trying to read … | |
Need a standard fifo algorithm. for a cpu shceduler so one command comes in at a time. Please help Thank yOu | |
Please guys , Please share the code to implement gutmann algorithm , to erase data in hard disk,. Please share (sharath198@gmail.com) Thank you. | |
hey, kind of new to c++ started working with functions and am trying to write program using them trying to make hangman game using functions, with my following code i am getting this error message [linked error] undefined reference to 'askGuess()' id returned 1 exit status [build error] [ number5.exe] … | |
Hey, I am writing a program that takes the size of an nxn matrix [A], randomly creates that matrix, as well as an nx1 matrix [S], multiplies them together to create [A]*[S]=[B]. Then, using Gaussian Elimination, I use matrix [A] and [B] to find [x] such that [A]*[x]=[B]. I can … | |
For example, I want to write a minesweeping. I know the interior algorithm, but I don't know how to start creating a gui. How should I get started? Thanks. | |
Hey there :) :) :) I'm doing a "simulation" project for the first-come, first-served (FCFS) CPU scheduling algorithm. To give u an idea of what this is: CPU Scheduling is all about having a Scheduler determine which process should be allocated to the CPU next. It has many various algorithms … | |
I have many things done so far in my project. However, in my switch statement it does not generate random numbers like it did earlier. You'll see what I mean. Other than that I need help with the scoring part of the assignment. Can anyone please help me? I feel … | |
Below are the instructions for what I am currently working on. I am having 2 problems first is printing the values stored in my array right now i have it set up in a for loop but there seems to be something wrong with the syntax of my System.out statement … | |
Hi all, I have implemented some code for simple columnar encryption. The algorithm is encrypting properly as I want. But during decryption it's giving me some errors. Please go through and suggest me if any idea [code] public static void encrypt(RandomAccessFile f,RandomAccessFile d,int columns) throws Exception { d.seek(10); // SEEK … | |
Okay, so as a project for one of my classes I need to make a basic drawing program in VB that can do three things: [LIST] [*]"Draw" with a brush of some sort [*]Clear the screen [*]Perform a flood-fill (paintbucket action) [/LIST] I decided to do the first two tasks … | |
I recently wrote an implementation of STL Vector as a programming exercise. The program compiles but I receive a strange error saying: [CODE] terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc [/CODE] I've never come up with this error before and am not sure what exactly should be … | |
Hi, I have just created an algorithm and could this be the greatest algorithm invented for calculating square roots? Perhaps the answer is yes with 100% accuracy unlike some algorithms that round the last digit up. Below is the algorithm I have created and I used php. Also this algorithm … | |
I am new to assembler, using the 68HC11 processor. I need to multiply two SIGNED 8 bit numbers using the partial product-shift algorithm. Some help in the right direction would be helpful. Thanks. | |
I'm not sure how to title the question I have so I can't be certain this hasn't been answered before. That said, following is a description of my programming question. I have a class R containing 2 integer elements, say X and Y. I then have two 24 element arrays … | |
The source code is here: [url]http://www.policyalmanac.org/games/aStarTutorial.htm[/url] Can anybody help as to what code needs to be added to enable this pathfinding algorithm to work with a isometric 2d tile map which is based completely on this XNA tile map tutorial: [url]http://www.xnaresources.com/default.asp?page=Tutorial:TileEngineSeries:4[/url]. I just need a working pathfinding for isometric map … | |
So I was thinking all last night and all morning about what exactly the algorithm update that happened on Thursday entailed. Word on the street is that they are targeting content farms, and sites with lower quality information. Content quality is all subjective, of course, as opposed to Google's history … | |
A new google algorithm was released yesterday which has been targeted at content farms. According to the Google blog, it affects 11% of all search queries on the web, making it one MASSIVE update. We were *significantly* hit, losing about 50% of our traffic we normally get from Google. From … | |
hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] … | |
Hi. It's actually not a C++ code, it's a matlab code. But I hope there's somebody here who can help me. There's not really an appropriate forum here for a matlab code. It's about Gaussian Elimination [url]http://img189.imageshack.us/i/50468910.png/[/url] I already have a code that only needs to be modified. [code] clear … | |
So, I'm writing an implementation of List in C++ as a programming exercise, so far I have this: [CODE]#include <iostream> #include <algorithm> using namespace std; template <class T> class Link; template <class T> class List_iterator; template <class T> class List { public: typedef List_iterator<T> iterator; List(); List(const List<T> & l); … | |
Hello all, Inverting an upper (or lower) triangular matrix is a trivial algorithm, due to the nature of the matrix. I am having an issue getting a part of my upper-triangular matrix inversion function to work, and I would like to get it working soon for a personal project. From … | |
Can any one help me to run this program? I am trying to modify it for multiple linear regression and use Gaussian elimination to solve the matrix.I found this in a book but it is not working:(Does anyone have anything related?I am a beginner so please something not so complicated … | |
Kindly tell an algorithm to sort a data of 500mb while the memory of the system is just 2 mb. Thanks | |
I need to read a text file and change each character into morse code, then send it to another file. is there an easier way than having 26 different arrays associated to a different letter? | |
In Distance Vector Algorithm (RIP) A row in routing table is itself a Distance vector, well, how large this Distance vector can be? As it’s direct links (neighbors=subnets) [B]only[/B]? | |
The game will have the computer generate a secret random number in the range of 1 to 100. The user will then have six tries to guess the secret number. After each guess, the algorithm will tell the user if the guess was too high, too low or was correct. … |
The End.