Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
170050084-170050092-170050102-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
SABBITHI NAREN RAHUL
170050084-170050092-170050102-git
Commits
1dacc156
You need to sign in or sign up before continuing.
Commit
1dacc156
authored
Aug 27, 2018
by
SABBITHI NAREN RAHUL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add basic implementation
parent
1998cd82
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
main.cpp
main.cpp
+1
-0
sorting.cpp
sorting.cpp
+23
-0
sorting.h
sorting.h
+1
-1
No files found.
main.cpp
View file @
1dacc156
#include<iostream>
#include<iostream>
#include<vector>
#include<vector>
#include "sorting.h"
#include "sorting.h"
#include "sorting.cpp"
using
namespace
std
;
using
namespace
std
;
int
main
(){
int
main
(){
int
n
;
int
n
;
...
...
sorting.cpp
0 → 100644
View file @
1dacc156
#include<iostream>
#include<vector>
#include "sorting.h"
using
namespace
std
;
vector
<
int
>
sort_custom
(
vector
<
int
>
c
){
bool
pass
=
false
;
//have we passed through the cay without a swap?
int
temp
;
while
(
!
pass
){
pass
=
true
;
for
(
int
i
=
0
;
i
<
c
.
size
()
-
1
;
i
++
){
if
(
c
[
i
]
>
c
[
i
+
1
]){
pass
=
false
;
temp
=
c
[
i
];
c
[
i
]
=
c
[
i
+
1
];
c
[
i
+
1
]
=
temp
;
}
}
}
return
c
;
}
sorting.h
View file @
1dacc156
#include<iostream>
#include<iostream>
#include<vector>
#include<vector>
using
namespace
std
;
using
namespace
std
;
vector
<
int
>
sort_custom
(
vector
<
int
>
);
vector
<
int
>
sort_custom
(
vector
<
int
>
d
);
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