Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security NachrichtenOne URL, Three Different Tricks, (Thu, Sep 24th)(24.09.2026 um 08:25 Uhr)
IT Security NachrichtenGartner: 41 Prozent der CISOs melden Deepfakes(24.09.2026 um 08:04 Uhr)
AI & KI NachrichtenJobstart: Rund die Hälfte erwartet KI-Kenntnisse(24.09.2026 um 08:05 Uhr)
AI & KI NachrichtenIT-Dienstleister im Vergleich 2026 - CHIP(24.09.2026 um 01:15 Uhr)
IT Security NachrichtenGefahren durch Berlins exfiltrierte Verwaltungsdaten - IT&Production(24.09.2026 um 02:51 Uhr)
IT Security NachrichtenWeb, Cloud und Security zusammen denken - Swiss IT Magazine(24.09.2026 um 06:56 Uhr)
IT Security NachrichtenAnzeige KI in der IT-Sicherheit für Pentesting und Resilienz - Golem.de(24.09.2026 um 07:20 Uhr)
IT Security NachrichtenOne URL, Three Different Tricks, (Thu, Sep 24th)(24.09.2026 um 08:25 Uhr)
IT Security NachrichtenGartner: 41 Prozent der CISOs melden Deepfakes(24.09.2026 um 08:04 Uhr)
AI & KI NachrichtenJobstart: Rund die Hälfte erwartet KI-Kenntnisse(24.09.2026 um 08:05 Uhr)
AI & KI NachrichtenIT-Dienstleister im Vergleich 2026 - CHIP(24.09.2026 um 01:15 Uhr)
IT Security NachrichtenGefahren durch Berlins exfiltrierte Verwaltungsdaten - IT&Production(24.09.2026 um 02:51 Uhr)
IT Security NachrichtenWeb, Cloud und Security zusammen denken - Swiss IT Magazine(24.09.2026 um 06:56 Uhr)
IT Security NachrichtenAnzeige KI in der IT-Sicherheit für Pentesting und Resilienz - Golem.de(24.09.2026 um 07:20 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Understanding Bubble sort Using The Number Guessing Game - CA03

Before diving into sorting algorithms, let us first understand the application we are working with: a Number Guessing Game. This will help give context to why sorting is needed. A Number Guessing Game is a simple interactive game…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Before diving into sorting algorithms, let us first understand the application we are working with: a Number Guessing Game. This will help give context to why sorting is needed.



A Number Guessing Game is a simple interactive game where:




  • The system generates a random number within a given range (for example, 1 to 100)

  • The player tries to guess the number


  • After each guess, the system provides feedback:




    • "Too high" if the guess is greater than the number

    • "Too low" if the guess is smaller than the number






  • The game continues until the player guesses the correct number





To make the game more interesting, it can include different difficulty levels:




  • Easy: Smaller range (e.g., 1–50)

  • Medium: Moderate range (e.g., 1–100)

  • Hard: Larger range (e.g., 1–200)



Higher difficulty levels make the game more challenging.



Leaderboard Concept



To track player performance, we introduce a leaderboard.



Each player’s result is stored with:




  • Name

  • Difficulty level

  • Number of attempts taken to guess correctly



Example:




Alice   Hard     7
Bob Easy 3
Charlie Medium 5
David Easy 2






Why Sorting is Needed



The leaderboard should display players in a meaningful order:




  1. Players who chose easier difficulty should appear first

  2. If two players have the same difficulty, the one with fewer attempts should rank higher



To achieve this, we need a sorting algorithm.



Introduction to Bubble Sort



Bubble Sort is a simple sorting algorithm that works by repeatedly comparing adjacent elements and swapping them if they are in the wrong order.



The process continues until the entire list is sorted.



How Bubble Sort Works




  • Start from the first element in the list

  • Compare it with the next element

  • Swap them if they are not in the correct order

  • Move to the next pair

  • Repeat this process for the entire list



After one complete pass, the largest element moves to the end.



This process is repeated for the remaining elements until the list is fully sorted.



Example



Consider the list:




[5, 2, 4]






First pass:




  • Compare 5 and 2 → swap → [2, 5, 4]

  • Compare 5 and 4 → swap → [2, 4, 5]



Second pass:




  • Compare 2 and 4 → no swap



Final sorted list:




[2, 4, 5]






Applying Bubble Sort to the Leaderboard



In our leaderboard:




  • We first compare players based on difficulty

  • If difficulty is the same, we compare based on number of attempts

  • We swap players if they are not in the correct order



This process continues until the leaderboard is properly sorted.



Python Implementation






Leaderboard data



leaderboard = [

{"name": "Alice", "difficulty": "Hard", "attempts": 7},

{"name": "Bob", "difficulty": "Easy", "attempts": 3},

{"name": "Charlie", "difficulty": "Medium", "attempts": 5},

{"name": "David", "difficulty": "Easy", "attempts": 2}

]






Convert difficulty into numeric value



def get_difficulty_value(level):

if level == "Easy":

return 1

elif level == "Medium":

return 2

else:

return 3






Bubble sort function



def sort_leaderboard(data):

n = len(data)





for i in range(n):

for j in range(0, n - i - 1):

    d1 = get_difficulty_value(data[j]["difficulty"])
d2 = get_difficulty_value(data[j + 1]["difficulty"])

if d1 > d2:
data[j], data[j + 1] = data[j + 1], data[j]

elif d1 == d2:
if data[j]["attempts"] > data[j + 1]["attempts"]:
data[j], data[j + 1] = data[j + 1], data[j]



return data











Output



sorted_list = sort_leaderboard(leaderboard)



for player in sorted_list:

print(player)

Conclusion



The Number Guessing Game provides a simple and practical use case for understanding sorting. By implementing a leaderboard and applying Bubble Sort, we can organize player data effectively.



Although Bubble Sort is not efficient for large datasets, it is an excellent starting point for learning how sorting algorithms work.

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - Understanding Bubble sort Using The Number Guessing Game - CA03
id: ed7c88cc-52de-490a-9432-e9d512846d44
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Understanding Bubble sort Usin" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Understanding Bubble sort Using The Numb.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Understanding Bubble sort Using The Number Guessing Game - CA03

Thematisch verwandte Begriffe: Understanding, Bubble, sort, Using · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96676 | A vulnerability was identified in Fast FAC1900R 20190827_2.0.2. The impa…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick