405 Topics

Member Avatar for
Member Avatar for marcelmarcelmarcelmarcelmarcelmarcelmarcelmarcel

Hello, for a school assignment I was supposed to write an insertion sort algorithm for a doubly linked list. As the feedback system of this particular course is rather weak (actually non-existent) I would like to ask you for your honest opinion about how well this is implemented, what could …

Member Avatar for David W
0
2K
Member Avatar for Daniel_34

I'm studying for a test and appreciate your help. How to calculate the running time (T(n)) of the following segment (written in Pascal): k := 0; m := n; while m <= n do begin k := k + 1; m := k * k; end; for i := 1 …

Member Avatar for glenn_3
0
218
Member Avatar for nataraja833

I've have a String String s = " ~ ( A || B ) && C "; A B C can take 0,1,x they follow Boolean Arithmetic w.r.t 'x' Boolean Arith is as follows 0 || x = x 1 || x = 1 x || x =1 x && …

Member Avatar for Taywin
0
345
Member Avatar for pooja.singh.3950

The Interviewer Candidate Problem It is a walk-in-interview setup having an interview room with one chair and a waiting room with a number of chairs. The interviewer interviews candidates in the interview room. When the interviewer finishes interviewing a candidate, he dismisses the candidate and goes to the waiting room …

Member Avatar for pooja.singh.3950
0
241
Member Avatar for veljko

I need a maze solver that uses queue type breadth first search to find a way out of the maze and print it out. I already made a dfs one but i cant seem to figure out how to make a bfs one. Here it is: #include <stdio.h> #define red …

Member Avatar for gusano79
0
959
Member Avatar for Diellza

Dear all, I need the code for counting sort algorithm but I try this code but is not working #include <iostream> #include <conio.h> #include <time.h> #include <stdlib.h> //srand and rand functions using namespace std; void add_random_numbers(long arr[], long b); void countingSort( long left, long right, long vector[], int k, long …

Member Avatar for deceptikon
0
787
Member Avatar for Diellza

I want to write a code for Radix Sort based in this way how I made the Quick Sort, how can I do with Radix Sort, can anybady have any idea I have search a lot but I can not find any exactly what I need #include <iostream> #include <conio.h> …

Member Avatar for David_50
0
614
Member Avatar for Diellza

I want to make this code with random numebr array and time executation? Does anybady nows how can I do? #include <iostream> using namespace std; void print(int a[], int sz) { for (int i = 0; i < sz; i++ ) cout << a[i] << " "; cout << endl; …

Member Avatar for Diellza
0
284
Member Avatar for Diellza

I want to do one example of Radix sort generating random numbers and timing. Can anybady help me? Here is the radix pseudocode function radixSort(String s) for i in (s.length - 1) -> 0 do stableSort(s[i])

0
176
Member Avatar for mgold

I'd like to find an algorithm book that's either meant to be or good to use as a reference. By "reference" I mean that it contains all the basic algorithms (machine-learning algorithms especially) like QuickSort, Logistical Regression, Clustering. Preferably, including both the mathimicatical definition as well as psuedo code, or …

Member Avatar for StefanijaV93
0
448
Member Avatar for Necrozze

So I have writen a program that takes a linkedlist and shuffles it randomly using mergesort algorithm. The problam I'm having now is that the original list loses elements after the shuffle, and after som checking with some outputs it seems that it always one of the extra lists who …

Member Avatar for Necrozze
0
808
Member Avatar for nathan.pavlovsky

Hello programmers! I have been working on STL algorithms for some time now as a beginner, and I started doing an exercise, among which is the task of `use the fill algorithm to fill the entire array of strings named items with "hello"`. My code for this is below: // …

Member Avatar for nathan.pavlovsky
0
1K
Member Avatar for happygeek

First there was Panda, and then there was Penguin, but is there now Ghost as well? Webmasters will immediately know what I'm talking about as far as Penguin and Panda are concerned: updates to the Google search results ranking algorithm designed to make the search experience more relevant for end …

Member Avatar for omthavertch
9
2K
Member Avatar for tapananand

I guess most of you would have seen the algorithm for the following problem: **Input:** Set of intervals(time) **Output:** Partion of intervals into minimum subsets such that no interval in a subset overlaps. **The Algorithm:** Sort intervals by start times and look them in this order, put each interval in …

Member Avatar for tapananand
0
290
Member Avatar for Doogledude123

I am trying to create a File Searching Utility that finds all Files with a given Name which searches all Folders (Sub Directories, and Sub Directories of Sub Directories) in a given Directory. I was thinking of a way to use For Loops, or For Each, but that would mean …

Member Avatar for JamesCherrill
0
257
Member Avatar for NyQii

i have to find a round trip for an Edinburgh bike club (data below) using two approaches: a) a conventional search algorithm; b) a genetic algorithm What i must do : 1. Produce a program using a search algorithm of your choice that will find a ‘good’ circuit from Edinburgh …

Member Avatar for jwenting
0
262
Member Avatar for oanahmed

Hi! I want to know how artificial intelligence system(s) work(s)? I want to know whether artificial intelligence depends upon software i.e special type of software having special algorithms or it depends upon special type of hardware having characteristics like human brain cortex and neuron system or both of them(software and …

Member Avatar for oanahmed
-1
386
Member Avatar for Rootz

When I try to compile my code in visual basic 2010 it gives me the error 1903 and when I compile the code in Code::Blocks it opens the standard template library's algorithm.h file and takes me to line 2163 if (*__i < *__first) I don't want to modify anything here, …

Member Avatar for Rootz
0
822
Member Avatar for Labdabeta

Hello, I recently took a course on assembler/compiler construction. In it we covered parsing algorithms such as LL(n), LR(n), LALR(n), and SLR(n). I understand how these parsing algorithms can be used to determine **if** an input string follows a context free grammar (CFG). At some point I also understood how …

Member Avatar for Labdabeta
0
283
Member Avatar for castajiz_2

There was a user named Mitja Bonca wich spent a lot of his time on the C# section. Before a year ago i ve seen a algorithm that he did for a guy providing him help in that way. This algorithm was tremendous (was then) and i can t locate …

Member Avatar for castajiz_2
0
237
Member Avatar for ezkonekgal

hello. I need some help on our implementation on lines of code program. here's the algorithm we have: 1. The LOC program will start by asking for the filename of the program to be counted. 2. Browse for the filename of the program to be used. 3. The contents of …

Member Avatar for emoon11
0
2K
Member Avatar for hbk_star2006

hello Please help me. I need pseudo code or Algorithm or flowchart of Weighted page rank algorithm that search engine can use for ranking the websites in its search results. Please help. thanks in advance.

0
146
Member Avatar for Shekhawat_1

I have a problem in c, i want to achieve this kind of thing using the code i written below. The input and output should be like this: Input Freq Output Freq 1 0,1,4,2,5,3 add two first (0+1) 0,1,4,2,5,3,1 2 4,2,5,3,1 add min and last (2+1) 0,1,4,2,5,3,1,3 3 4,5,3,3 add …

Member Avatar for Shekhawat_1
0
203
Member Avatar for olabamiji14

please i want to implement another algorithm for clustering based on the problems the existing are facing such combining 2 algorithm that will have no lapses at all.

Member Avatar for lativa
0
94
Member Avatar for hahahanz

not sure where to post this but anyways I wrote this code to calculate the max profit from a 5 kg max weight. heres the code. there is an error with the price. when I use small values below 20 its all normal but when I input large values there …

Member Avatar for iamthwee
0
112
Member Avatar for mgold

I'm trying to implement an algoirthm descirbed here: http://pub.uni-bielefeld.de/luur/download?func=downloadFile&recordOId=2497720&fileOId=2525546 The purpose of that algorithm is to create a concept hierarchy based on a document corpus. For instants, a "Dog" concept would be a child of the "Animal" concept in such a hierarchy. To the point, I've come accross a peice …

Member Avatar for sepp2k
0
274
Member Avatar for Vasthor

isShorter(const string &s1, const string &s2) { return s1.size() < s2.size(); } stable_sort(ret.begin(), ret.end(), isShorter); either using stable_sort or sort the result is shown in the attachment. meanwhile: "By calling stable_sort, we can maintain alphabetical order among those elements that have the same length:" - C++ Primer 5th edi. which …

Member Avatar for deceptikon
0
192
Member Avatar for mrmodest34

I have written this code to variably test Prim's algorithm and I am timing it using clock(). For some reason it always returns 0 as its running time. I have other code that I have used this exact implementation in and they are returning the currect running times. The code …

Member Avatar for meta.quota
0
459
Member Avatar for electrodelic

**hello peeps and geeks, i am missing the MinSpanningTree function here.. any help please? need to fill up the function to get a) Minimum spanning tree cost for the graph b)Spanning tree path for the graph. E.g in matrix or adjancency list. ** #include <iostream> #include <ctime> // For time() …

Member Avatar for Mouche
0
309
Member Avatar for priyanka.choudhary.90038

Hi, In below code snippet , can anyone let me know how to print the functor value output (3,4,5,6,7) without embedding add function in class. #include<iostream> #include<vector> #include<algorithm> using namespace std; void add ( int i) { i=i+2; } int main() { vector <int> vec ={1,2,3,4,5}; for_each(vec.begin(), vec.end(),add); for (auto …

Member Avatar for richieking
0
254

The End.