Questions tagged [algorithms]

This tag is for questions about presenting specific algorithms or general principles of algorithmic design and analysis to students. It IS NOT for questions about writing or fixing algorithms.

Filter by
Sorted by
Tagged with
3
votes
2answers
256 views

System to validate run time complexity requirements

TL;DR: Do you know of a method/system that can determine the run time complexity of code automatically? At our university we have a system in place that allows students to submit their code and get ...
2
votes
1answer
48 views

What is the closest pair problem useful for?

The closest pair problem is the famous problem of finding out the closest pair of points given an arbitrary set of points on a plane. This problem has a divide and conquer algorithm and often is used ...
3
votes
4answers
4k views

A real world example for the divide and conquer method

Can someone give a real world example for the divide and conquer method? For example, I've heard the boomerang used to explain the idea of a loop back address. What is a real world example we can use ...
3
votes
2answers
105 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 ...
24
votes
12answers
324 views

Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language?

I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer ...
1
vote
2answers
55 views

How to introduce problem solving to primary school pupils?

I'm interested into knowing your experiences about introducing problem solving to primary school pupils. I'm a PhD candidate in Operations Research and, together with my University or my public ...
2
votes
1answer
119 views

Pedagogical issues with Stack Implementation

I am new to teaching the particular syllabus I have been asked to teach and I am confused by the approach given for several of the algorithms. For example the stack implementation based on the course ...
4
votes
1answer
92 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 ...
3
votes
2answers
125 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 ...
6
votes
2answers
399 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 ...
2
votes
1answer
82 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 ...
20
votes
4answers
467 views

Difficulty of algorithms homework problems

I have a question for educators, from the perspective of a TA. I'm happy to post my question elsewhere if it's not appropriate for this site. Homework problems in algorithms classes often involve ...
7
votes
4answers
346 views

Will you tell students that Algorithms + Data Structures = Programs now(21st century)?

Algorithms + Data Structures = Programs occurs in 1976 (in Niklaus Wirth's book). In the past, we (teachers) may usually cite this equation to emphasize the importance of algorithms/data structures. ...
5
votes
3answers
132 views

“Computer sciency” and “practical” exercices involving dictionaries

I am teaching a course in data structures to a 2o semester. We hear often that the dictionary is a very versatile data structure, and solves quite so many problems. I'd like to illustrate that, but, ...
4
votes
4answers
255 views

How to avoid misconceptions about while loop when using null loop

Is it problematic to teach students to use an empty while loop to create an until loop? If so, what learning progressions avoid ...
4
votes
2answers
117 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 ...
7
votes
6answers
427 views

Single-dimensional array and simple looping activities of significance

I give a lab on single-dimensional loops and arrays. By "single dimensional loops", I mean that there is no nesting of loops. (I will later give a second lab on multi-dimensional loops and arrays, ...
4
votes
2answers
115 views

How do I construct a basic lesson on computational complexity and undecidability?

Essential Understanding 4.2 of the AP CS Principles curriculum is as follows: "Algorithms can solve many, but not all, computational problems." Among the topics I am expected to cover in the context ...
8
votes
3answers
206 views

How to teach algorithms: implementation or application?

One unit of CS50 AP's curriculum focuses on three main sorting algorithms: bubble sort, selection sort, and insertion sort. There is also discussion of something more efficient like merge sort. One ...
19
votes
17answers
8k views

How can I help my students to think algorithmically?

I teach 13-14 year old boys an "Introduction to Computer Science" course. For most of them, it is their first structured coding experience. Before we even touch an IDE, I have them walk through ...
8
votes
5answers
3k views

Pseudocode or Flowcharts?

For GCSE CS in the UK, students have to analyse, design, code, test and review a solution to a problem. For the design section of their project, students have to plan out the algorithm for each part ...
10
votes
6answers
643 views

How to bring attention to computational complexity?

Many beginners strive to solve given problems, without thinking about efficiency of solution. Consider such Python code: ...
5
votes
1answer
130 views

Significant algorithm from CS for DrRacket that emphasize cons, car, and cdr

When my students move up to junior year, they make a series of transitions: from programming to theoretical computer science, and from imperative to functional programming. We use DrRacket, and one ...
5
votes
2answers
226 views

Introducing A* Search Algorithm

I created a group lab where one student makes a random maze generator, one student makes a corresponding maze solver, and the last student calls the methods created by both students and creates an ...
-1
votes
3answers
1k views

How to explain to people the importance of algorithms in computer programming?

Many computer science problems can be solved by more than one algorithm. Usually those algorithms have different problem-solving approaches and therefore different strengths and weaknesses. My ...
15
votes
3answers
497 views

What are effective approaches for teaching dynamic programming?

Dynamic programming is a subject that's notoriously difficult to learn and to teach. It's one thing to educate oneself, say by reading the appropriate chapters in Kleinberg & Tardos or CLRS, and ...