Questions tagged [data-structure]

This tag is for questions related to both data abstraction/encapsulation in general and for the usage of the various data structures provided by language or built by programmers. Stack and Queue are classic examples.

Filter by
Sorted by
Tagged with
3 votes
3 answers
80 views

What is a motivating example for a cyclic linked list?

I told students that singly linked lists can have cycles. A student asked why one would. Are there good examples, or is it just something that comes up on job interviews?
Ellen Spertus's user avatar
2 votes
3 answers
93 views

Searching for algorithms using array, stack, queue, List or no data structure solving interesting problems

rI am a teacher in germany (high school) and I am searching for algorithms, that solve interesting problems using no data structure or linear data structures only. The goal is to motivate the students ...
BenBar's user avatar
  • 21
2 votes
1 answer
84 views

Does anyone know of any reliable summary of the complexity of common data structure operations?

It seems that the most popular source on the internet on this topic is https://www.bigocheatsheet.com/: Wikipedia and basically any other similar table I find on the internet copy this one. There are ...
GermanJablo's user avatar
3 votes
1 answer
831 views

Which is the best book for algorithms before I dive into Leetcode?

I am really interested in diving into leetcode. However, I want a solid foundation on data structures and algorithms being used to solve the problems in Leetcode. Please recommend to me some books/...
Nazmus Saqueeb Ashrafi's user avatar
5 votes
1 answer
159 views

What is the technology (or combination of technologies) one would use to create slides, animations and live coding for lectures?

I teach Computer Science courses. Ideally, I would like to have all teaching materials in a website: slides, animation of data structures operations, live coding to illustrate the basic data ...
Drimades Boy's user avatar
0 votes
1 answer
74 views

Why might be the benefits of teaching data structure course in Python?

As the question suggests, is it a good idea to teach Data Structure course in Python. Or what be any good rationale for teaching Data Structure course in Python and not in C++.
motiur's user avatar
  • 101
2 votes
1 answer
210 views

Textbook or video lectures to develope intuition for solving any unseen Graph Theory problems

Background Hello, I am a third year undergraduate in CS. I am eager to pursue higher education from one of the best institutes in out country. For that I need to write a competitive exam, named GATE ...
Abhishek Ghosh's user avatar
2 votes
1 answer
37 views

Teaching (2,3) and AVL Trees: information in internal nodes or in external nodes?

Are there practical applications (or other reasons) to teach (2,3) and AVL search trees with both keys and the associated information (as opposed to only search keys) in the internal nodes, as opposed ...
J..y B..y's user avatar
  • 121
4 votes
5 answers
454 views

First Time Learning Non-Linear Data Structures

I'm looking for effective strategies and projects for introducing non-linear data structures to students. I currently teach linked lists, stacks, and then introduce binary trees. A lot of students ...
guitarcat's user avatar
  • 321
1 vote
1 answer
138 views

Coding assignments for algorithms and data structures?

Do you know of any online resource with ideas/projects for an Algorithms and Data Structures course? Topics in the course include: basic data structures (array, list, stack, queue, priority queue, ...
Drimades Boy's user avatar
3 votes
2 answers
176 views

Understanding Introduction to Algorithms, 3rd Edition

I'm taking a course on data structures and algorithms and it follows the book Introduction to Algorithms, 3rd Edition (ISBN-10: 9780262033848) by Charles E. Leiserson, Clifford Stein, Ronald Rivest, ...
SelfStudy22's user avatar
4 votes
4 answers
686 views

What are competitive programming problems that require a tree data structure to solve them?

I want to practice my problem-solving skills that involve the usage of a tree data structure (e.g. Binary Search Tree, Heap, <...
mercury0114's user avatar
4 votes
2 answers
341 views

Abstract data type that has "include" "remove" and "is in" and only those

In a data structures course, we see trees, balanced trees, hash tables. These have an important thing in common: we can use them to keep a collection of elements (with operations add and remove) and ...
josinalvo's user avatar
  • 331
3 votes
2 answers
175 views

How should one go into learning algorithms and data structures? What do you think is an efficient way to do so?

Should one first understand its logic and see its implementation? Or should one try to implement it first oneself? How should one learn so that one can quickly implement the algorithm or data ...
Sankalp1999's user avatar
6 votes
9 answers
3k views

What are some good problems which can be solved with a queue?

I am trying to introduce the idea of stacks and queues in a course on data structures. For stacks, my idea was to show some interesting examples of problems, like evaluating an expression in RPN, or ...
Agnishom Chattopadhyay's user avatar
5 votes
1 answer
414 views

How to learn to solve trees, graphs questions for competitive programming

I learnt about trees and graphs from my textbooks (undergraduate level) last year. But now I'm doing competitive programming and unable to solve questions involving these concepts. I fail to ...
asn's user avatar
  • 151
3 votes
2 answers
231 views

Project based on game 2048

I'm thinking about an assignment based around the game 2048. This would be towards the end of a first programming course at the university level and assumes the students have been introduced to at ...
Fritz Sieker's user avatar
  • 1,133
8 votes
4 answers
1k views

First project in my second year data structures intro

I am currently teaching the pretty much normal second year Data Structures and Algorithms course. In this course there are four programming projects, with the first project completed the automated ...
Ilkka Kokkarinen's user avatar
4 votes
1 answer
122 views

Example for Introduction to Generics in Java

What are some good example classes for introducing generics in Java? I'm introducing this in the context of implementing ArrayList, but I don't want my first ...
cryptic_star's user avatar
2 votes
1 answer
157 views

How to structure a Predictive Keyboard project similar to GBoard

Many are now familiar with GBoard, the Google / Android predictive Keyboard. I don't actually know how it works. Obviously it must gather usage data on the device where it is being used, but it ...
Scott Rowe's user avatar
23 votes
12 answers
6k views

What are the advantages/disadvantages of teaching how to implement Nodes, Linked Lists, Stacks, and Queues before showing built-in implementations?

I'd like to introduce my students to Nodes and then require them to implement their own Linked Lists, Queues, and Stacks before showing them that their language (C#) provides implementations of these ...
Java Jive's user avatar
  • 2,349
5 votes
3 answers
194 views

Is there any pedagogically motivated reason to teach quadratic probing?

I'm currently preparing a unit on the implementation of hash tables for a data structures and algorithms course (this is a university-level class if it matters). Specifically, I'm focusing on ...
Michael0x2a's user avatar
  • 4,005
3 votes
3 answers
187 views

How to keep students heads from exploding from complex, interconnected topics

My students will soon be learning ADO.Net in C#, adding on to the Windows programming skills that they recently gained. Just a few pages from one chapter in the textbook introduce the set of layers ...
user3292's user avatar
13 votes
4 answers
505 views

How to teach students to work with multiple layers of abstraction?

I'm currently preparing to teach a course on data structures and algorithms. In my past experiences helping teach similar courses, I've noticed that many students find it challenging to "hold multiple ...
Michael0x2a's user avatar
  • 4,005
27 votes
19 answers
24k views

What are some good examples of using a stack data structure?

I'm looking for examples to give my students when lecturing about stacks, for use-cases of the stack in programming and life. So far I've been thinking of a pole of rings (when you can insert or ...
Yotam Salmon's user avatar
  • 1,205
4 votes
3 answers
99 views

Introducing self containing objects (Node)

In some programming languages, many data structures use Node<T> (The examples in the question are in Java, but I suppose they are similar in other languages): ...
ItamarG3's user avatar
  • 6,287