Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
170050086-170050097-170050100-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
RANJANA B KASANGERI
170050086-170050097-170050100-git
Commits
34944d87
Commit
34944d87
authored
Aug 27, 2018
by
RANJANA B KASANGERI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update implementation to merge sort
parent
81f41d3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
sorting.cpp
sorting.cpp
+3
-3
No files found.
sorting.cpp
View file @
34944d87
...
@@ -32,13 +32,13 @@ vector<int> sort_custom(vector<int> m)
...
@@ -32,13 +32,13 @@ vector<int> sort_custom(vector<int> m)
return
m
;
return
m
;
vector
<
int
>
left
,
right
,
result
;
vector
<
int
>
left
,
right
,
result
;
int
mid
dle
=
((
int
)
m
.
size
()
+
1
)
/
2
;
int
mid
=
((
int
)
m
.
size
()
+
1
)
/
2
;
for
(
int
i
=
0
;
i
<
mid
dle
;
i
++
)
{
for
(
int
i
=
0
;
i
<
mid
;
i
++
)
{
left
.
push_back
(
m
[
i
]);
left
.
push_back
(
m
[
i
]);
}
}
for
(
int
i
=
mid
dle
;
i
<
(
int
)
m
.
size
();
i
++
)
{
for
(
int
i
=
mid
;
i
<
(
int
)
m
.
size
();
i
++
)
{
right
.
push_back
(
m
[
i
]);
right
.
push_back
(
m
[
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