No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
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 … |
|
Suppose a program is accessing an 5-d array a[5][5][5][5][5], what is the order of the array if I want to present it in a one-dimentional array? |
|
I am currently working on my assignment about a simple text editor that can open, add line and delete line and so and so... I designed an algorithm to add new line to the doc and it works for the first time but didnt work after it, I dont know … |