Skip to content

Instantly share code, notes, and snippets.

View Ellie068's full-sized avatar
🏳️‍⚧️
Saving up for Estrogen

Nyxie "Ellie" Ellie068

🏳️‍⚧️
Saving up for Estrogen
View GitHub Profile
class Node {
Node(this.value, [this.next]);
int value;
Node? next;
@override
String toString() {
final result = StringBuffer();
result.write(value);
@Ellie068
Ellie068 / DSA_9.18_Binary_search.dart
Created September 22, 2025 16:57
Homework assignment of 9/18, Binary Searching algorithm
void main() {
final myList = [2,5,8,10,13,16,17,18,20,24,26,29,33,37,41,44,50,55];
print('Original list: $myList');
int target = 20;
int foundIndex = binarySearch(myList, target);
if (foundIndex == -1) {
print('Number $target not found!');
} else {
void main() {
final myList = [8, 9, 3, 5, 1, 3];
print("Unsorted: $myList");
bubbleSort(myList);
print("Sorted: $myList");
}
import 'dart:typed_data';
void main() {
final myList = MyList();
print(myList.length); // 0
myList.add(10);
myList.add(420);
myList.add(9000);
print(myList); // [10, 420, 9000]
@Ellie068
Ellie068 / DS&A 9.4 HW.dart
Created September 6, 2025 11:04
Homework of List part2, implemented the [] operators and _grow method when the memory gets full. I also added my own _debug feature to keep the terminal outputs be understandable between the debug print() lines in the functions and the regular outputs.
import 'dart:typed_data';
void main() {
final myList = MyList();
print(myList.length); // output: 0
myList.add(10);
myList.add(5);
myList.add(3);
print(myList.length); // output: 3
@Ellie068
Ellie068 / data alg 9.3
Last active September 3, 2025 08:02
homework for the Data Structure & Algorithm from class Sep 2nd
import 'dart:typed_data';
void main() {
final myList = MyList();
print(myList.length);
myList.add(10);
print(myList.length);
print(myList);
}