Computer Programming - 12.1 to 12.7

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

Describe the differences between static and dynamic data types

knowt flashcard image
2
New cards

Describe self-referencing structures

knowt flashcard image
3
New cards

Describe the malloc and free functions

knowt flashcard image
4
New cards

Describe how a linked list is created

ListNodePtr startPtr = NULL

<p>ListNodePtr startPtr = NULL</p>
5
New cards

Describe a way to search through a linked list

knowt flashcard image
6
New cards

Describe a way to insert a new node into a linked list

knowt flashcard image
7
New cards

Describe how to delete a node from a linked list

knowt flashcard image
8
New cards

Describe how a stack is create

knowt flashcard image
9
New cards

Describe insertions in stacks 

  • Push

<ul><li><p>Push</p></li></ul><p></p>
10
New cards

Describe Deletion in stacks

  • Pop

<ul><li><p>Pop</p></li></ul><p></p>
11
New cards

Describe the creation of queues

knowt flashcard image
12
New cards

Describe insertions in a queue

  • Enqueue

<ul><li><p>Enqueue</p></li></ul><p></p>
13
New cards

Describe deletion in queues

  • Dequeue

<ul><li><p>Dequeue</p></li></ul><p></p>
14
New cards

Describe the creation of binary trees

knowt flashcard image
15
New cards

Describe sorted binary trees

knowt flashcard image
16
New cards

Describe Binary Tree Inorder traversal

void inOrder(TreeNodePtr treePtr) {
    if (treePtr != NULL) {
        inOrder(treePtr->leftPtr);
        printf("%3d", treePtr->data);
        inOrder(treePtr->rightPtr);
    }
}

<pre><code class="language-C">void inOrder(TreeNodePtr treePtr) {
    if (treePtr != NULL) {
        inOrder(treePtr-&gt;leftPtr);
        printf("%3d", treePtr-&gt;data);
        inOrder(treePtr-&gt;rightPtr);
    }
}</code></pre><p></p>
17
New cards

Describe Binary Tree Preorder traversal

void preOrder(TreeNodePtr treePtr) {
    if (treePtr != NULL) {
        printf("%3d", treePtr->data);
        preOrder(treePtr->leftPtr);
        preOrder(treePtr->rightPtr);
    }
}

<pre><code class="language-C">void preOrder(TreeNodePtr treePtr) {
    if (treePtr != NULL) {
        printf("%3d", treePtr-&gt;data);
        preOrder(treePtr-&gt;leftPtr);
        preOrder(treePtr-&gt;rightPtr);
    }
}</code></pre><p></p>
18
New cards

Describe Binary Tree Postorder traversal

void postOrder(TreeNodePtr treePtr) {
    if (treePtr != NULL) {
        postOrder(treePtr->leftPtr);
        postOrder(treePtr->rightPtr);
        printf("%3d", treePtr->data);
    }
}

<pre><code class="language-C">void postOrder(TreeNodePtr treePtr) {
    if (treePtr != NULL) {
        postOrder(treePtr-&gt;leftPtr);
        postOrder(treePtr-&gt;rightPtr);
        printf("%3d", treePtr-&gt;data);
    }
}</code></pre><p></p>