sw.BaseStream.Seek(0, sk);
for (int i = 0; i < data2.Count; i++) {
sw.WriteLine(data2[i] + "\n"); }
sw.Flush(); sw.Close();
nama = save.FileName.Substring(0, save.FileName.Length - 4) + "_gnome.txt";
fs = new FileStream(nama, FileMode.OpenOrCreate);
sw = new StreamWriter(fs); sk = new SeekOrigin(); sw.BaseStream.Seek(0, sk);
for (int i = 0; i < data3.Count; i++) {
sw.WriteLine(data3[i] + "\n"); }
sw.Flush(); sw.Close(); }
}
private void buttonBack_Click(object sender, EventArgs e)
{
FormHome home = new FormHome(); home.Show();
this.Hide(); }
} }
//Algoritma Strand Sort using System;
using System.Collections.Generic; using System.Linq;
using System.Text;
namespace Sorting_data {
public class strandSorting {
Byte[] asciiTemp1, asciiTemp2;
List<String> words = new List<String>(); String stringTemp;
int maxChar;
public strandSorting(List<String> _words) { words = _words;
}
public List<String> prosesSort() {
if (words.Count <= 1) return words;
for (int i = 1; i < words.Count; i++) {
int j = i - 1; int index = -1;
List<string> s = new List<string>(); s.Add(words[i]);
s.Add(words[j]);
gnomeSort gnom = new gnomeSort(s); gnom.prosesSort();
while (words[i] != s[1]) {
index = j; j--;
if (j < 0) break; s.Clear();
s.Add(words[i]); s.Add(words[j]); gnom.prosesSort(); }
if (index == -1) continue;
string temp = words[i];
{
words[k] = words[k - 1]; }
words[index] = temp; }
return words;
//Algoritma Sieve Sort using System;
using System.Collections.Generic; using System.Linq;
using System.Text;
namespace Sorting_data {
public class Sievesort {
List<String> words = new List<String>(); gnomeSort gnome;
List<String> non_asc;
List<List<String>> asc = new List<List<String>>();
public Sievesort(List<String> _words) {
words = _words; }
public List<String> prosesSort(){ List<String> tempListAsc = new List<String>();
List<String> tempListNonAsc = new List<String>();
List<String> tempListMax = new List<String>();
non_asc = words;
int t = 0; int s = 1;
do {
tempListAsc.Add(non_asc[t]);
for (int i = 1; i < non_asc.Count; i++) {
tempListMax.Add(non_asc[t]); tempListMax.Add(non_asc[s]);
gnome = new gnomeSort(tempListMax); if
(gnome.prosesSort()[1].Equals(non_asc[s])) {
tempListAsc.Add(non_asc[s]); t = s;
else {
tempListNonAsc.Add(non_asc[s]); s++;
}
tempListMax = new List<string>(); }
asc.Add(tempListAsc); non_asc = tempListNonAsc;
tempListAsc = new List<string>(); tempListNonAsc = new List<string>(); t = 0;
s = 1;
} while (non_asc.Count != 0);
words = asc[0];
for(int i = 0; i < asc.Count - 1; i++) {
for(int j = 0; j < asc[i + 1].Count; j++) {
for (int k = 0; k < words.Count; k++) {
tempListMax = new List<string>();
tempListMax.Add(words[k]); tempListMax.Add(asc[i+1][j]); gnome = new
gnomeSort(tempListMax);
if
(gnome.prosesSort()[1].Equals(words[k])) {
words.Insert(k, asc[i + 1][j]);
break; }
} } }
return words; }
//Algoritma Gnome Sort using System;
using System.Collections.Generic; using System.Linq;
using System.Text;
namespace Sorting_data {
public class gnomeSort {
Byte[] asciiTemp1, asciiTemp2;
List<String> words = new List<String>(); String stringTemp;
int maxChar;
public gnomeSort(List<String> _words) { words = _words;
}
public List<String> prosesSort(){
for (int i = 1; i < words.Count; ) {
asciiTemp1 =
Encoding.ASCII.GetBytes(words[i - 1].ToCharArray()); asciiTemp2 =
Encoding.ASCII.GetBytes(words[i].ToCharArray());
maxChar = asciiTemp1.Length; if (asciiTemp1.Length >
asciiTemp2.Length) {
maxChar = asciiTemp2.Length; }
for (int j = 0; j < maxChar; j++) {
if (asciiTemp1[j] < asciiTemp2[j]) {
i++; break; }
else if (asciiTemp1[j] > asciiTemp2[j])
{
break; }
if (j == maxChar - 1) {
if (maxChar == asciiTemp1.Length) {
i++; }
else if(maxChar == asciiTemp2.Length)
{
stringTemp = words[i - 1]; words[i - 1] = words[i]; words[i] = stringTemp; i = 1;
break; }
} }
}
return words; }
DAFTAR RIWAYAT HIDUP
PERSONAL DATA
Full Name : Ruth Stephany Marsaulina Siahaan Nick Name : Fanny
Place/ Date of Birth : Medan / 01 September 1992
Sex : Wanita
Religion : Kristen Protestan Nationality : Indonesia
Address : Jl. M. Yakub no.56 Kota Medan.
Provinsi Sumatera Utara, Indonesia Mobile Phone : +62852-6110-5369
E-mail : [email protected]
EDUCATION
Bachelor of Computer Science
2014-2017 : Universitas Sumatera Utara, Medan
Diploma of Electronic Engineering
2010-2013 : Politeknik Negeri Medan
Higher Secondary Education
2007-2010 : SMA Negeri 7 Medan
Secondary Education
2004 - 2007 : SMP Budi Murni 1 Medan
Primary Education
1998 - 2004 : SD Budi Murni 7 Medan
Programming PHP, C#
Database MySQL
IDE Software
ORGANIZATIONAL EXPERIENCE
Organization Position Year
OSIS SMP Anggota 2005-2007
OSIS SMA Ketua Departemen Agama Kristen 2008-2010
PADUAN SUARA SMA Bendahara 2008-2010
PA SMA Anggota 2007-2010
KMK POLMED Anggota 2011-2012
HMPS TEKNIK ELEKTRO Ketua Sie.Humas 2011-2012
BEM POLMED Anggota 2012-2013