Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
173050031-183050016-183050011-git
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KSHITIJ SINGHA
173050031-183050016-183050011-git
Commits
58ca7897
Commit
58ca7897
authored
Sep 23, 2018
by
KSHITIJ SINGHA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
ca9c0ac7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
main.cpp
main.cpp
+2
-2
sorting.cpp
sorting.cpp
+4
-5
sorting.h
sorting.h
+1
-1
No files found.
main.cpp
View file @
58ca7897
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
using
namespace
std
;
using
namespace
std
;
v
oid
sort_custom
(
vector
<
int
>&
a
);
v
ector
<
int
>
sort_custom
(
vector
<
int
>&
a
);
void
printVector
(
vector
<
int
>
a
);
void
printVector
(
vector
<
int
>
a
);
...
@@ -20,7 +20,7 @@ int main(int argc, char const *argv[])
...
@@ -20,7 +20,7 @@ int main(int argc, char const *argv[])
a
.
push_back
(
num
);
a
.
push_back
(
num
);
}
}
//printVector(a);
//printVector(a);
sort_custom
(
a
);
a
=
sort_custom
(
a
);
printVector
(
a
);
printVector
(
a
);
...
...
sorting.cpp
View file @
58ca7897
using
namespace
std
;
#include <vector>
#include <vector>
void
sort_custom
(
vector
<
int
>&
a
)
#include "sorting.h"
using
namespace
std
;
vector
<
int
>
sort_custom
(
const
vector
<
int
>&
a
)
{
{
bool
swapp
=
true
;
bool
swapp
=
true
;
while
(
swapp
){
while
(
swapp
){
...
@@ -16,5 +15,5 @@ void sort_custom(vector<int>& a)
...
@@ -16,5 +15,5 @@ void sort_custom(vector<int>& a)
}
}
}
}
}
}
//
return a;
return
a
;
}
}
sorting.h
View file @
58ca7897
using
namespace
std
;
using
namespace
std
;
v
oid
sort_custom
(
vector
<
int
>&
a
);
v
ector
<
int
>
sort_custom
(
vector
<
int
>&
a
);
void
printVector
(
vector
<
int
>
a
);
void
printVector
(
vector
<
int
>
a
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment