Skip to content

Instantly share code, notes, and snippets.

Layne yolayne

View GitHub Profile
View index.xml
<craft>
<info>
<title>Untitled</title>
</info>
<param name="h" type="int" default="20"
label="height of the cylinder"/>
<param name="n" type="int" default="3"
label="number of spheres"/>
View index.xml
<craft>
<info>
<title>Shining Snowman</title>
</info>
<stack>
<sphere radius="6"></sphere>
<circle></circle>
<sphere radius="10"></sphere>
<sphere radius="16"></sphere>
<polygon points="50,9 60.5,39.5 92.7,40.1 67,59.5 76.4,90.3 50,71.9 23.6,90.3 32.9,59.5 7.2,40.1 39.4,39.5"
@yolayne
yolayne / Btree Insert1
Created Mar 1, 2013
Btree Insert1. It's passing on the unit test, but not on Retrograde :(
View Btree Insert1
void insert(btree* &root, int key)
{
if (root == NULL)
{
cout << "This tree does not yet exist." << endl;
btree* new_tree = new btree;
new_tree->num_keys = 1;
new_tree->keys[0] = key;
new_tree->is_leaf = true;
root = new_tree;
@yolayne
yolayne / Sorting with a BST
Created Feb 8, 2013
Using insert_data and to_array functions from my Binary Search Tree project as my mystery sort on my Sorting Algorithms project.
View Sorting with a BST
// This mystery_sort is going to use my insert_data and to_array function from BST project!
void mystery_sort(vector<int> &data)
{
bt_node* top = init_node(data[0]);
// Looping through the data and adding it to my BST.
// ...Using my insert_data function which calls my insert function.
for (unsigned int i = 1; i < data.size(); i++)
You can’t perform that action at this time.