GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Brute Force Algorithms

Lisa Calder Englisch 4 Karten

Karten in diesem Stapel (4)

  1. 1Selection Sortfun SelectionSort(A[0...n-1]):
    for i in 0 to n-2:
    min = i
    for j in i+1 to n-2:
    if A[j] < A[min]:
    min = j
    A[i] swap A[min]
    O(n^2)
  2. 2Brute Force String MatchingPattern = p, length m
    Text = t, length n
    for i = 0 to n-m:
    j = 0
    for j < m and p[j] = t[i+j]:
    j += 1
    if j = m:
    return i
    return false
    O(nm)
  3. 3Closest Pairmin = infinity
    for i in 0 to n-2:
    for j in i+1 to n-1:
    a = sqrt((xi-xj)^2+(yi-yj)^2)
    if a < min:
    a = min
    p1 = j
    p2 = i
    return(p1,p2)
    O(n^2)
  4. 4Exhaustive SearchKnapsack Problem
    Traveling Salesman

Informationen

Beschreibung
Karteikarten am Brute Force Algorithms, erstellt von Lisa Calder am 09/04/2019.
Erstellt von
Lisa Calder
Aufrufe
4
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck