Skip to content
This repository has been archived by the owner on Aug 26, 2019. It is now read-only.

sovled_doublingArrayElements #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/doubleArrayElement.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define db double
#define pll pair<ll,ll>
#define pdb pair<db,db>
#define clr(x) memset(x,0,sizeof(x))
#define count_bit(x) __builtin_popcount(x)
const ll size=1e6+7;
const ll mod=1e9+7;

int main()
{

cout<<"Enter the size of the array"<<endl;
ll n;cin>>n;
cout<<"Enter the array elements"<<endl;
vector<ll> vi;

for(ll i=0;i<n;i++)
{
ll x;cin>>x;
vi.pb(x);
vi[i] = 2*vi[i];
}

cout<<"The array elements after doubling are :"<<endl;
for(auto x:vi)cout<<x<<" ";
}
1 change: 1 addition & 0 deletions src/transpose_matrix.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// WAP to transpose the matrix