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
21b49692
Commit
21b49692
authored
Sep 23, 2018
by
DIPTYAROOP MAJI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update usage in main.cpp
parent
117b9e95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
main.cpp
main.cpp
+8
-2
No files found.
main.cpp
View file @
21b49692
#include <iostream>
#include<stdio.h>
#include <vector>
#include "sorting.h"
...
...
@@ -7,15 +8,20 @@ using namespace std;
int
main
(
int
argc
,
char
const
*
argv
[])
//main function
{
vector
<
int
>
a
;
int
s
,
e
;
int
num
=
0
;
printf
(
"Enter start & end index : "
);
scanf
(
"%d %d"
,
&
s
,
&
e
);
while
(
num
!=
-
1
)
{
std
::
cin
>>
num
;
if
(
num
!=
-
1
)
a
.
push_back
(
num
);
}
a
=
sort_custom
(
a
);
vector
<
int
>
tmp
=
sort_custom
(
a
,
s
,
e
);
for
(
int
i
=
s
;
i
<
e
;
i
++
)
a
[
i
]
=
tmp
[
i
-
s
];
for
(
int
i
=
0
;
i
<
a
.
size
();
i
++
)
{
cout
<<
a
[
i
]
<<
" "
;
...
...
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