3,815 Topics
![]() | |
Hi Every one in this great community ...i need help with Nokia BlockD game algorithm i really do not know how to start ,,,please could anyone here can get my feet on the stage ,just help me with some ideas to be able to get started: The rules of the … | |
Alright, so I've spent countless hours on this code and I need a fresh pair of eyes to give it a glance... This is my third assignment for my datastructures class, where I am to write code that turns a fully parenthesized expression (such as "((3+2)/(3-8))") into aan "arithemtic expression … | |
Hi all, I have been asked for a homework assignment to write, in Motorola 68K Assembly, an algorithm to sort an array and place the sorted array into another array. I have absolutely no idea how to do this...I have been working on it but i'm having a hard time … | |
Hi, What could be the most efficient algorithm(time/memory wise) for the below problem? Q: create an array of unique elements from a given array? Thanks in advance. | |
hi guys. im using this script to convert information to its md5 equivalent. smhow im not able to make it work.plz help as towhy its not workin. here my code to test the function. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> … | |
Hello, I'm having trouble translating an algorithm. I'm not sure I coded bits of this correctly, but I'm certain that I have no idea how to compare an item with a node identifier (cannot apply > operator with T,T) but since this is an insert sorted method rather than insert … | |
Hi. I'm new to this forum and to programming in general. This is my first programming class and it is in JAVA. I have been doing alright in the class, but am really struggling with this weeks program assignment. If you could help me out at all I would really … | |
I need to write a c program which takes a algorithm as the input and gives the equivalent c source code as the output.any ideas???? | |
I am sort of told that O(c^n) complexity could be the case of string permutations. but what is this specific 5^n? can anyone think of a simple algorithm with O(5^n)?thx | |
Okay, I have a header file I am trying to stub out to my_list.cpp but I keep getting these errors that I do not understand and have been working down to them but I got stuck. I figure I'm in deep trouble seeing as I can hardly stub these out, … | |
hey, can anyone help me with these comlexity problems? I tried with myself but still want some clarifications..cheer,here is the code: [CODE](a) public void printPow2(int[] values) { for (int i = 1; i < values.length; i *= 2) System.out.println(values[i]); } (b) public void maxDifference(int[] values) { int max = 0; … | |
hi, I need help figuring out how the following was calculated: a quadratic algorithm uses 500 operations to process an input of size 10, how many operations will it use given an input of 1000? The answer given is 5,000,000 but I can't work out how it was calculated. Any … | |
Hello, I need to find repeated sequences within a vector. I have been thinking about using search, as is described [URL="http://www.cplusplus.com/reference/algorithm/search/"]here[/URL]. But this uses an array to search, I don't need to use extra memory, as I am seaching for sequences [B]within[/B] the same vector. Any suggestions on how to … | |
There's this rectangular polygon (all angles are 90* or 270*) which happpens to be convex as well and this rectangular polyline which intersects the polygon on two occasions. The polyline thus splits the polygon into two new rectangular polygons. Is there an easy way to obtains these two polygons in … | |
Hi all, I'm trying to make a program that breaks an entered sentence into seperate words, then compares the words to a predefined txt file of words. So far I have the following code, but it just doesnt work for some reason. no errors or anything. It asks for the … | |
help me below algorithm. it gives wrong output e2 was wrong. 7.38..... [CODE]#include <cstdlib> #include <iostream> #include <math.h> using namespace std; int main(int argc, char *argv[]) { float x, err, term_1,result=1.0; int i=1,burcin; float factorial; cout << "x="; cin >> x; cout <<"error tolerance="; cin >> err; term_1=err+1; while (term_1 … | |
Below has the source code to the program Im writing... anyway I want to do this... I want to be able to include a file from the project in my executable... Example: If I put the program on a different computer, I want it to able to open a file … | |
Hello; I need to develop a money class that will simulate the cash box of a register. The cash box will contain coins and currency in the following denominations: $100, $50, $20, $10, $5, $1, $0.25, $0.10, $0.05, and $0.01. I am barely new in C++. I couldn't figure out … | |
Hello, I want to write a program in C++ that approaches the number pi by using the Monte Carlo algorithm. Therefore I need random numbers. When the amount of random numbers goes to infinity, the probability will approach the theoretical propability, which is a function of pi. I know all … | |
![]() | Hello! I wonder if anyone used google-diff-match-patch for fuzzy string comparisons, i.e., for finding a closest/most similar string? Can anyone explain and give some examples? Also, in genera, what would be the best matching algorithm in Python. I tried Levenshtein, but matches are not so good, and I tried difflib.get_close_matches … |
The program like the title says is supposed to return the largest integer value in an user-inputted integer array, using binary recursion. And in the case of an empty array, return Integer.MIN_VALUE. I am kind of stuck on the logic of this binary recursive algorithm. I know there is errors … | |
im trying to get my code to perform dijkstra's algorithm on my adjacny matrix, it works great for the inital row (0) but i cant get it working for any other value?! [CODE]void dijkstra (int a[size][size], int matSize, string CityID[size]) { string startCity; cout << "Enter start city : "; … | |
I am working on a control break algorithm in C, and part of this algorithm is to have while loop check for the end of file and whether two strings equal each other. the first string is a part of a typedef struct structure called 'record' [I]rec.state[/I], and the second … | |
I've been working hard all day to get this to work. I'm playing around with the math module in python. I eventually want the following code to help me control the speed of a servo motor. The idea is to get the servo speed to accelerate and then decelerate as … | |
Hi, I need help with an algorithm to allocate rooms to people. I need to shuffle through a list of rooms to assign a room to a person and after the fourth person is assigned to the room, it should be out of the list(should be unavailable). I have not … ![]() | |
Hi.. first of all, I want an answer in details if u dont mind.. When we use a class with Pointer data members,why do we need to: 1. include a destructor and a copy constructor in the class 1. overload an assignment operator which return pointer this for example: // … | |
Please help me. I am having trouble implementing the breadth first search algorithm for the classic 8 puzzle problem. I have some code if anybody can help. Or is there any tutorials or examples that you can link to me? My problem is that it only solves about 5 different … | |
I'm transitioning my old, dinasour-ish program written with arrays and pointers to vectors and ran into some problem with iterators. I'm using Visual Studio 2005 SP1. In debug mode the follow message appeared upon reaching the part of the code indicated further below: Debug Assertion Failed! expression ("_Myptr > ((_Myvec*)(this->_Mycont))->_Myfirst",0) … | |
For my program I am supposed to implement an encryption and decryption algorithm. You will read the input from a file, “plaintext.txt” The file will contain plaintext strings that are all lowercase, and be of the format: 3 hello world 2 how are you Each line contains an integer as … | |
GENERAL DESCRIPTION A prime number is an integer greater than 1 whose only integer factors are 1 and itself. A right-truncatable prime number (or right-prime number) is a prime number that remains prime as each of its rightmost digits is removed. For example, consider the value 719. 719 is prime, … | |
hi... i'm a newbie to this community of superb IT professionals.. act i'm doing a project in image processing using c and all i wanted to kno is that,is it possible to do the image processing of a colour image without converting it to a gray scale image and then … | |
i have a problem hoping if any one can help me. i have to do a project on data clustering with graph theory. the tool must cluster 4 disease avium, leprae, tuberculosis,and bovis. i want to have a sample java code of the mst clustering algorithm to cluster these files. … | |
Here is my assignment: [url]https://docs.google.com/document/edit?id=1lf2t8LOqKmXK8tu8lW7ghDOd1IJw9BXBRi_PDXFtPQo&authkey=CLnyu7UE&hl=en#[/url] Here are the other classes I am using: [url]https://docs.google.com/leaf?id=0B_UHOsQPEyMBNDBhMWExNTgtMTJmNy00MTQxLWI1ZGItMDZiZjM3YTZiZjRi&authkey=CP2ujcoM&hl=en[/url] I am receiving a NullPointer on line 53: regularNumbers.enqueue(i); But, I am not sure why. Additionally, I need to display my results 12 primes per line, and a space between each. Suggestions? Thanks all for taking … | |
Actually I'm new in java, only 2 year, but force to develop advance application for my final year degree project. I'm going to developt image sketching and sketched recognition for police force. My question are: 1. What technique that i could use to to developt to combine several image in … | |
For my program I am supposed to implement an encryption and decryption algorithm. I then have to print it out using my functions I have to read the input from a file, “plaintext.txt” The file will contain plaintext strings that are all lowercase, and be of the format: 3 hello … | |
Hi all, I am senior in high school and I am currently taking computer science classes in which we are learning C++. I understand the most basic implmentations of C++ fundamentals. I am seeming to have a lack of full understanding with heaps. I have borrowed several books in the … | |
Hi , pls i need your help . i write algorithm that calculate prefix average .. sum=0 for i=1:n do sum =suma+a[i] b[i]=sum/i return array b my teacher said , write above code using insted for .. how i can use the other for .. what are your opinion? | |
I'll first give you a basic overview of my task, I'm working with Deterministic Context Free Languages. It's not really important if you don't know what that is, I've got that covered. I just need help on developing an algorithm. Basically I'm given an Axiom, which is my starting string, … | |
[B]question:[/B]Ten arrays of string of characters representing ten surnames are to be inputed from the keyboard. the strings are of diffrent length but none is longer than 20 characters. It is required to arrange these surnames aphabetically, and to determine the length of each surname.implement in c and print out … | |
[CODE] #include<stdio.h> #include<conio.h> #include<math.h> int a[70]; //src disk array int b[70];//temp disk array int c[70];//tar disk array int val, srcval=1,tempval=0,tarval=0; int es[3] = {1,1,0}; //array to decide iteration of disks from and to int et[3] = {1,0,1}; int etr[3]= {0,1,1}; int os[3] = {1,1,0}; int ot[3] = {0,1,1}; int otr[3]= … | |
I have a payroll program that I been working on for a while and I gotten my code written. Yet, when I compile the program it keep giving me erros and I can't figure out why. I wonder is there anyone out there can tell me why I keep getting … | |
I am currently trying to develop an algorithm for the following problem: Read data from a text file such as: the driver returns on his glorious day. He's very happy to be safe and.sound at home, with his wife. With that data, i need to print the length of each … | |
I have a payroll program that I been working on for a while and I gotten my code written. Yet, when I compile the program it keep giving me erros and I can't figure out why. I wonder is there anyone out there can tell me why I keep getting … | |
Hello Everyone. Could anyone please help me quickly find duplicates in a vector of over 60000 records. It takes a loooootttttt of time ;'(. Here's the code. [code] #include <string> #include <vector> #include <iostream> #include <algorithm> #include <sstream> struct MyPred { std::string x; std::string y; // add default values MyPred(const … | |
hi.... Iam working on file compression using Huffman algorithm... my problem is that when i try to restore the compressed file.. only text file can be recovered.. other file recovered with the size; but cant be opened i read byte each time from the file to restore it thanks... | |
[CODE]//This a partially completed prototype of project 2 //currently use file FlatData1.dat as its initial roster #include <iostream> #include <fstream> #include <vector> #include <string> #include <stdlib.h> #include <cstring> #include <algorithm> using namespace std; typedef enum { thisWeek, nextWeek } WEEK; typedef enum { clean, wash, shop } DUTY_TYPE; typedef enum … | |
Its my first post, and its a complicated one... I need some help writing an image coloring algorithm for a personal project. I have two programs, a restorer and a code generator. The restorer reads code generated by the code generator and manipulates the mouse accordingly. [I]Every mouse event is … | |
I am just starting a programming class in C++ and my teacher hasn't taught anything about writing pseduocode and programs, yet expects us to be able to do so. I need help!!!! 1. Write out a complete algorithm in pseudocode for the following: User enters two uppercase letters or two … | |
Hello All, Back again...Working on a program which requires that the user should be able to interact with the program. The objective of the program is this: A class called unique-bag which will store integers using dynamic array. This class stores only one copy of any given integer (no duplicate … | |
hello everyone. i am a student of computer engineering. i was wondering if there are any online tutorials on the basics of algorithms and algorithm design techniques. |
The End.