405 Topics
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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; … |
|
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 … |
|
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 … |
|
|
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. |
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 |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
[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 |
|
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 … |
|
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. |
|
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 … |
|
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 … |
|
[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 … |
|
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 … |
|
I just wanted to know what famous algorithms that you should have in hand? or be familiar with? or That is always used? |
|
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 … |
|
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 = { … |
|
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 … |
The End.