Minggu, 17 April 2016

How To Solve ARRAY

How To Solve
ARRAY
maaf soal dibawah memakai b.inggris.
1.array order reversal
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int m,n,c,d,first[10][10],second[10][10],sum[10][10];
cout<<" masukan baris dan colom : \n";
cin>>m>>n;
cout<<"masukan angka : \n";
for(c=0;c<m;c++){
for(d=0;d<n;d++){
cin>>first[c][d];
}
cout<<endl;
}
cout<<" balikannya : \n";
for(c=0;c<m;c++){
for(d=0;d<n;d++){
cout<<first[d][c];
}
cout<<endl;
}

for(c=0;c<m;c++){
for(d=0;d<n;d++){
sum[c][d]=first[c][d]+first[d][c];
}
}
cout<<"jumlah\n";
for(c=0;c<m;c++){
for(d=0;d<n;d++){
cout<<sum[c][d]<<"\t";
cout<<endl;
}
}

return 0;
}
hasilnya


2. array counting or histogramming

3. finding the maximum number in a set.

4. removal of duplicates from an ordered array.

5. partitioning an array

6. finding the kth smallest element.

7. Longest Monotone Subsequence


jika ingin lengkap jawaban 3 dan 4 bisa di lihat di sini klik 
jika ingin lengkap jawaban 5 dan 6 bisa di lihat di sini klik

0 komentar:

Posting Komentar

Posting Lebih Baru Posting Lama Beranda

Diberdayakan oleh Blogger.

About us

Formulir Kontak

Nama

Email *

Pesan *

Find Us On Facebook

Translate

Popular Posts

Video Of Day

About

TechClue

Techclue Is A Multi layout Style Blogger Template. You Can Use This Template For Education Site As Well As For Simple Magazine Sites. Techclue Is The Perfect Combination Of Design.We install Lots Of Features Like Responsive Layout, SEO Optimization Etc.

Join Our Community!

Popular Posts

Recent Posts

Popular Posts

 

Followers

 

Flickr Gallery

Templates by Nano Yulianto | CSS3 by David Walsh | Powered by {N}Code & Blogger