26 Discussion / Question Topics
Remove Filter
|
|
anyone can give me an advice for improving this piece code, it give me a complexity of score of 10. There is something telling in back of my mind that it can be improve, but this is the best i can do. arggg public override bool Validate(Control control, object value) … |
|
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 … |
|
package JavaApplication42; import java.io.*; import java.io.IOException; import java.util.*; import java.io.BufferedReader; public class DPmodification { public static void main(String[] args) { BufferedReader br = null; int n, c, d,k, swap,i=0,j=0,no_of_selected_item=0; int numItems; int numTransactions; double minSup; String configFile = "F:\\New Folder\\configtrial.txt"; try{ FileInputStream file_in = new FileInputStream(configFile); BufferedReader data_in = new … |
|
So i don't really understand how I will calculate the time complexity for my code, I've had a hard time with it and I would really need some help. the exponent is N all the time. So how will i find the time complexity in N-time(bits).. for(int i = 0; … |
|
At the moment I am trying to decide which book to buy, there are many that I think would be very interesting, but some are most likely beyond me. The books in my list, along with my thoughts on them are: Concrete Mathematics (I believe this is probably too advanced … |
|
GPO Problem So I’m having an issue configuring a password complexity group policy in my company’s network environment and I’m hoping someone with some solid experience with GPOs can help me out. We came in a while ago as salary workers to replace an out sourced IT department. I’m guessing … |
|
Hi everyone, so I'm developing this app for android, I'm using "Android Studio" to code it and it's layout, but there's the thing, I can't seem to make the layout as I want, like the buttons are too huge or they aren't in the correct position and they're always messed … |
|
# Need your help! - Masters thesis / research paper # ## Hi there, ## within the final stage of my masters thesis I need to conduct a survey concerning "Advertising Appeal for Corporate Websites". I would appreciate your participation in my online survey/questionnaire. The reason for this survey is … |
|
int sum=0; for(i1=0,i1<m,i++){ for(i2=0,i2<m,i++){ for(i3=0,i3<m,i++){ ... ... ... for(im=0,im<m,i++){ sum += a[i1][i2][i3]...[im]; } } } } What is the time complexity of the above code? btw, I always having problems related to time complexity, do you guys got some good article on it? especially about the step count and loops … |
|
Time complexity of the expression T(n)=3T(n/2)+Ɵ(n)? Please solve.. |
|
What is complexity to insert, delete, and search in both sorted and unsorted linked list (single, double.. doesn't matter in general) ? |
|
I am given the amount of data and the time used. It asks for the time complexity. It is in a Big-O packet Below is the first problem given Algorithm A Data Time 1000 .003 2000 .012 4000 .048 8000 .192 Please explain how to get the time complexity. Thanks! |
|
Hello all! First time poster here and I'm looking for a little help figuring out the time complexity of this program. int y; void p(int x) { x = y - 1; y += x; cout << x << " " << y << endl; if (x<3) p(x); cout << … |
|
Please can you help me to calc the complexity of this algorithm it may looks easy but i am new to all that int f=1; int x=2; for (int i = 1; i <= n; i*=2) for (int j = 1; j <= i * i; j++) if (j % … |
|
Hello Everyone , I Try many Way,But I'm Unable to find out Cyclomatic Complexity of below C Code i = 0; while (i<n-1) do j = i + 1; while (j<n) do if A[i]<A[j] then swap(A[i], A[j]); end do; i=i+1; end do; Please Help Me out !!! |
|
Hi, I am trying to create a binary tree from a string read from a file. The string contains information that tells which is the new left and right nodes, and the node which new these nodes are to be added (assuming there is a root node in the tree … |
|
how you would compute/denote the time complexity of two loops based on different variables? I understand how to compute the time complexity for a simple loop PseduoCode while X<N { while Y<M { Z++ } X++ } one loop occurs N times - time complexity O(N) the other loop occurs … |
|
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 … |
|
Hi, I wanted to know the big Oh notation for this operation in Dynamic Array and LinkedList. I have answered the question but I am not sure if I really know how to determine the complexity. Please give me feedback of what I've done. Operation: Construct empty list : DA->O(1) … |
|
I've got an algorithm that at most does 1 operation for the first time a loop is run, 2 for the second, 3 for the third up to n for the nth. Essentially the sum of all numbers 1 to n is the worst case running time. or [TEX]\frac{n*(n+1)}{2}[/TEX] I … |
|
I am trying to determine the time complexity (and space complexity if anyone would like to have a go at it) of a sort function i implemented with a custom comparator. it is the sort function from the STL <algorithm>. First off, I am using Visual C++, so I am … |
|
So here's the question: Suppose as min heap uses parent pointers such that each node contains a pointer to its parent and the root has a null pointer. Given a pointer to the node, which isn't the root of the tree, containing the max key in the heap, what is … |
|
Hi, Is there anyone who know which complexity these functions are? I mean O(n), O(n^2), O(n^3), n log(n) or log(n) 1. --------------------------------------------- [CODE]void bogosort_array(double a[], int length) { do shuffle_array(a, length); while (! is_array_sorted(a, length)); }[/CODE] 2. --------------------------------------------- [CODE]void reverse_string(char* s) { int n = strlen(s); for (int i = … |
|
For homework, we have to find the time complexity class of certain algorithms and explain why it has that certain complexity class. So, I have a couple of questions: - Why is the first running time always so much longer than the ones after? (setting up the application or something??) … |
|
What language is the most difficult to compile and why ? (except natural ones) |
The End.