Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
18305R006-18305R009-18305R010-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
RAMEESH PAUL
18305R006-18305R009-18305R010-git
Commits
2378d823
Commit
2378d823
authored
Sep 21, 2018
by
Rameesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add basic implementation
parent
1326b5aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
main
main
+0
-0
main.cpp
main.cpp
+20
-1
sorting.cpp
sorting.cpp
+19
-0
sorting.h
sorting.h
+2
-0
No files found.
main
0 → 100755
View file @
2378d823
File added
main.cpp
View file @
2378d823
vector
<
int
>
sort_custom
(
vector
<
int
>
);
\ No newline at end of file
#include"sorting.h"
#include<iostream>
using
namespace
std
;
int
main
(){
int
n
;
vector
<
int
>
vin
;
vector
<
int
>
vout
;
cin
>>
n
;
for
(
int
i
=
1
;
i
<=
n
;
i
++
){
int
temp
;
cin
>>
temp
;
vin
.
push_back
(
temp
);
}
vout
=
sort_custom
(
vin
);
for
(
auto
i
=
vout
.
begin
();
i
!=
vout
.
end
();
++
i
)
cout
<<
*
i
<<
" "
;
}
\ No newline at end of file
sorting.cpp
0 → 100755
View file @
2378d823
#include<vector>
using
namespace
std
;
vector
<
int
>
sort_custom
(
vector
<
int
>
v
){
int
i
,
j
;
int
n
=
v
.
size
();
for
(
i
=
0
;
i
<
n
-
1
;
i
++
){
for
(
j
=
0
;
j
<
n
-
i
-
1
;
j
++
){
if
(
v
[
j
]
>
v
[
j
+
1
]){
int
temp
;
temp
=
v
[
j
];
v
[
j
]
=
v
[
j
+
1
];
v
[
j
+
1
]
=
temp
;
}
}
}
return
v
;
}
\ No newline at end of file
sorting.h
View file @
2378d823
#include<vector>
using
namespace
std
;
vector
<
int
>
sort_custom
(
vector
<
int
>
);
\ No newline at end of file
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