405 Topics

Member Avatar for
Member Avatar for kiail

I'm trying to make a bubble sort to sort numbers like 3.2, 5.8, etc(double / float numbers). I have this code so far, but I'm still trying to learn and don't know why my code isn't working the way I think it should. Any help is appreciated. [CODE]using System; using …

Member Avatar for Momerath
0
269
Member Avatar for Labdabeta

I understand that data on computers can be compressed (I see it all the time with zip files and jpegs) but I was wondering just how compression works. Thinking it through, if you data is represented by 1s and 0s then it can be corresponded 1 to 1 with a …

Member Avatar for Labdabeta
0
243
Member Avatar for Xheis

Hi, so I have this assignment to create a scheduling algorithm, I tried looking everywhere for help on how to create one and the closest one was here, where I found a great source code, yet I tried to modify it with my assignment variables and I created some nasty …

Member Avatar for histrungalot
0
3K
Member Avatar for MasterHacker110

I have been programming in C++ for a while now. I heard about RSA Encryption algorithm, and i have read many online sites on how it works. But i still cant grasp how the algorithm works. i have tried to make programs with RSA, but they doesnt encrypt. If you …

Member Avatar for Moschops
0
317
Member Avatar for bodymassacre

I have my first assignment for structured and object oriented problem solving. This is the problem and I wrote a program that had to include modules. I wanted to find out if what i did had any errors or if it is even written correctly at all. If its not …

Member Avatar for TrustyTony
0
194
Member Avatar for n4j

Hello every one! i write an implementation for kruskal's algorithm but i think it doesn't work properly! The final tree has loop! this is my problem. Can you tell me how i can solve this problem? here is the code: [CODE] #include <stdio.h> #include <conio.h> #include <iostream> using namespace std; …

Member Avatar for n4j
0
308
Member Avatar for n4j

Hello ,i have problem with code bellow. every data i enter it show me the weight '0'! Can you tell me how can i solve this problem? you should enter number of nods and edges and weight of each edge. [CODE] #include <stdio.h> #include <conio.h> #include <iostream> #include <Windows.h> using …

Member Avatar for n4j
0
253
Member Avatar for progdoc

I am currently working on my thesis which consists of a mobile parking application. It's basic function is that of finding a car spot for the user. I would like to find some computer science challenges within this scenario. An algorithm that will boost my mobile app or something of …

Member Avatar for WaltP
0
134
Member Avatar for stinkypete

Does anyone have an algorithm that generates all 10-digit integers that have at least one digit repeated? Trawling through all 9000000000 of them and checking them individually is too slow. Thanks.

Member Avatar for VernonDozier
0
895
Member Avatar for mikeshadow

I need an algorithm that finds how many prime numbers are in a set interval; the interval maximum range is 1 000 000 so a brute force method of checking every number is kinda inefficient

Member Avatar for mikeshadow
0
500
Member Avatar for happygeek

On the evening of 24th February, Google Principal Engineer Matt Cutts promised that a newly [URL="http://googleblog.blogspot.com/2011/02/finding-more-high-quality-sites-in.html"]tweaked search algorithm that impacted on 11.8% of search queries[/URL] (an absolutely massive change to the way that search works, in other words) would "reduce rankings for low-quality sites which are low-value add for users, …

Member Avatar for iamseo
7
3K
Member Avatar for NumOne

Hi I need to prove the following statements: 1) for any a>1, and any b, a^n ∈ ω(n^b). We have to prove f(n) > C.g(n) for all C>0, n0>0 and n>=n0 a^n > C . n^b Since a > 1 , I think a >= n and a > b …

Member Avatar for rubberman
0
106
Member Avatar for oldezwe

There are x number of users. Every time a user clicks a button, they give another random user a high-five. They get rewarded for giving the other user a high 5, and there is then an increase in the potential for them to receive a high five from others. Each …

Member Avatar for Philippe.Lahaie
0
153
Member Avatar for jim_underpants

Assume that we have a mergesort algorithm which takes 2 series as an input and returns 1 after the merge each time. So that if we want to count say memory blocks we would need 2 blocks for the input and 1 for the output accordingly, total size of 3 …

Member Avatar for Rashakil Fol
0
196
Member Avatar for apines

I see that there are many questions here regarding complexity analysis, specifically regarding the Big-O notation of algorithms. I will attempt to shed some light on the subject. I will start with an introduction, after which I will go over some common complexities and last we will solve a few …

Member Avatar for Rashakil Fol
13
1K
Member Avatar for jim_underpants

Design and analyze an algorithm that searchs for an element x in a sorted table A(with n elements), so that its complexity is O(logD). D stands for distance, counting the amount of elements between the first element and the element x in table A. Simpler, D is the position of …

Member Avatar for mrnutty
0
119
Member Avatar for smandape

Thank you for looking at my question. I am trying to solve this homework question. Consider the problem of sequencing genome by random reads. If G is the length of the entire sequence, L is the length of the read and n is the number of reads, then coverage is …

0
98
Member Avatar for aphide

Every day on his way home, little Billy passes by his great aunt Clara Mitchum's house. Generally he stops in for a chat with his aunt and sometimes he asks for some lollies. When he does, she generally gives him some, but then adds now don't be asking for any …

Member Avatar for WaltP
0
210
Member Avatar for Gribouillis

This snippet defines a function walk() which generically performs a depth-first traversal of a tree, using preorder, inorder or postorder rules. Here, genericity means here that there are no hypotheses on what the tree nodes are or the implementation of the tree. Walk() only needs an arbitrary object used as …

Member Avatar for Gribouillis
2
1K
Member Avatar for Matth963

[CODE]int numdigits(int num){ int len = 0; while(num >= 10){ num = num/10; len++; } return len; } [/CODE] This algorithm is used to count the number of digits but I can't understand it. Someone explain it to me please :D Thanks

Member Avatar for hfx642
0
102
Member Avatar for Blazikaen

hi... can anyone light me on an algorithm to solve sudoku...actually i did solve a few sudokus to know how this is done. Eventhough i managed to do the sudokus by paper and pencil, i can't figure out an algorithm to solve it. I googled for algorithms but everything ends …

Member Avatar for Adak
0
233
Member Avatar for funfullson

Hi every body. I want to make a topographical image from a 2d Aerial photograph. how can I do it in python? Thanks if help me.

Member Avatar for hughesadam_87
0
115
Member Avatar for optimumph

I'm trying to sort an array of numbers in ascending order and don't know whats wrong with my code (I'm completely new to vectors). I should first copy the input array (data) into an STL vector, then apply STL’s sorting algorithm to the vector, and finally copy the vector back …

Member Avatar for mzimmers
0
216
Member Avatar for typedefcoder

I have a series of Key value pairs. Each Key has 2 values. Values of Keys ma coincide. Initially i start with Key1, ValueKey1, ValueKey2 are stored in a set.(Maybe Array). Now for each consecutive Keyi, i check if Valuei, Valuei+1 are in the set. If any one of them …

Member Avatar for typedefcoder
0
229
Member Avatar for nicolebdillen

[CODE]//Program to find the sum of the main and right diagonals of a 2D array import java.io.*; public class Diagonals { public static void main(String[]args)throws IOException { int arr[][]={{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}}; int maindiag=0;int rightdiag=0; for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { if(i==j) { maindiag=maindiag+arr[i][j]; } } } System.out.println("The sum of the main diagonal …

Member Avatar for sneha_07
0
940
Member Avatar for eRayven38

Hey Guys, I am really trying to get into List-Implementation. Everything I wrote works fine except the "delete Element at Position" funktion. With the iterative Implementation there is no problem, everything works, but I want to do a recursive Version. This is the Task: Invent an algorithm which becomes a …

Member Avatar for deepu.sri24
0
1K
Member Avatar for chiiqui

I just wanted to know what famous algorithms that you should have in hand? or be familiar with? or That is always used?

Member Avatar for JeffGrigg
0
233
Member Avatar for friendskhaled

Please Help me I can't start with this project ! Implement a city 'database' using unordered lists. Each record contains the name of the city (a character string of variable length), the mayor of the city and the co:ordinates of the city as integer x and y, Your system should …

Member Avatar for masijade
0
268
Member Avatar for sachintha81

Let me first describe my situation. I have a list of Hex values, which are called BaseID. They are chosen [B]such that logical OR between any number of them will give you a unique ID[/B] which is called FinalID. That is, my BaseID values are as follows. BaseID = { …

Member Avatar for sachintha81
0
194
Member Avatar for mnmo88

In my final year project I have to build an Algorithm animator. It would be done to show how the algo works using nodes(PCs) and edges(connections). For example, how the leader ellection ring algo works. Anyway, I haven't started implementing yet. My supervisor wants me to do it as a …

Member Avatar for phoenix_2000
0
252

The End.