We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given an array arr[] of size N containing non-negative integers. You need to insert all elements of the array to deque and return it.
Input: 5 1 2 3 4 5
Output: 1 2 3 4 5
The text was updated successfully, but these errors were encountered:
#include<iostream> #include<deque> using namespace std; void pushindeque(int arr[], int n){ deque <int> q; for(int i=0;i<n;i++) q.push_back(arr[i]); for(int i=0;i<n;i++) cout<<q[i]<<" "; } int main(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; pushindeque(arr,n); return 0; }
Sorry, something went wrong.
You need to claim it first. Would you like to work on it @shubhamsharma6701?
Yes, I can help.
shubhamsharma6701
No branches or pull requests
Given an array arr[] of size N containing non-negative integers. You need to insert all elements of the array to deque and return it.
Input:
5
1 2 3 4 5
Output:
1 2 3 4 5
The text was updated successfully, but these errors were encountered: