How its gonna look without vector in cpp, recursive

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 17PE
icon
Related questions
Question

How its gonna look without vector in cpp, recursive

#include<iostream>
#include<vector>
using namespace std;
// sr
// sc
// dr
// dc
vector <string> getMazePaths(int sr, int sc,
int dr, int dc) {
source row
source column
destination row
destination column
}
void display(vector<string>& arr){
cout << "[";
for(int i
cout << arr[i];
if(i < arr.size() -1) cout <<
}
0;i < arr.size();i++){
cout « "]"<<endl;
}
int main() {
int n,m; cin >> n >> m;
vector<string> ans
-1);
display(ans);
- getMazePaths(0,0,n-1,m
%D
return 0;
}
Transcribed Image Text:#include<iostream> #include<vector> using namespace std; // sr // sc // dr // dc vector <string> getMazePaths(int sr, int sc, int dr, int dc) { source row source column destination row destination column } void display(vector<string>& arr){ cout << "["; for(int i cout << arr[i]; if(i < arr.size() -1) cout << } 0;i < arr.size();i++){ cout « "]"<<endl; } int main() { int n,m; cin >> n >> m; vector<string> ans -1); display(ans); - getMazePaths(0,0,n-1,m %D return 0; }
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Heapsort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning