Algorithms - Basic

Elementary Data Structures Abstract Data Types Java provides many abstract data types, for example in the java.util package. This exam does not refer to the built-in collections, but to your own classes. Recursion
  • Define recursion (note: to define recursion, you first need to define recursion - Anonymous)
  • Identify obvious cases of false recursion (that could be implemented with a loop and no stack).
  • Detect incorrect stop conditions that create never ending recursion.
  • Implement recursion for solving problems.
    For example:
    • Compute a factorial
    • Euclid: find the greatest common divisor
    • Evaluate a prefix expression (simple example of recursive descent parser). e.g. +2,3 (which equals 5).
    • Find the greatest number of an array (false recursion)
    • Move towers of Hanoi.
    • Binary search in an ordered array.
Trees
  • Define:
    • node, child/parent node, root, leaf,
    • path, height,
    • binary tree, ordered tree.
  • Implement a tree representation
  • Write an algorithm that:
    • Traverses a binary tree: preorder, inorder, postorder,
    • computes the height or the amount of nodes of a tree,
    • finds an element in a binary search tree,
    • constructs a tournament tree (from an array).
Sorting
  • Define a stable sort.
  • Identify and implement:
    • Selection sort.
    • Insertion sort.
Note: Java provides sorting algorithms, for example in the java.util package. This exam does not refer to these built-in algorithms, and require no knowledge about interfaces as Comparable.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值