Urgent.News

What's breaking now, across thousands of outlets.

Tech

Binary Search Trees

Why should you care? Imagine you have thousands or millions of numbers and frequently need to: Search for a value Insert new values Delete existing values Keep values organized An unsorted array may require O(n) searching. A sorted array can provide fast binary search, but inserting or deleting elements can require shifting many values. A Binary Search Tree (BST) provides a different approach: it…

Binary Search Trees (BSTs) are a data structure that combines the properties of binary trees and efficient searching algorithms. They are particularly useful when dealing with large sets of data that need to be frequently searched, inserted, or deleted. Unlike unsorted arrays, which require O(n) time for searching and can become inefficient when elements need to be inserted or deleted, BSTs maintain an ordered relationship between values while allowing dynamic operations.

This is achieved through a simple rule: for every node, all values in the left subtree are smaller, and all values in the right subtree are larger. This ordering allows for efficient searching, as it enables the tree to skip large portions of itself during the search process. For example, to find the number 60 in a BST containing the values 50, 30, 70, 20, 40, 60, 80, one would start at the root (50), determine that 60 is greater, move to the right child (70), and then move to the left child (60), finding the value immediately.

This process is far more efficient than searching through an unsorted array or a sorted array that requires maintaining order, making BSTs a valuable bridge between trees and efficient searching algorithms.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Subdomain Takeover Severity Comes From Security Context, Not the Exploit Mechanism

Subdomain Takeover Severity Comes From Security Context, Not the Exploit Mechanism saostatic.uber.com pointed to an unregistered CloudFront distribution.

  • Severity of subdomain takeover depends on security context, not exploit mechanism.
  • Dangling CNAME can lead to SSO bypass across all services for a domain.
  • 4-question framework aims to address triage failure in classification of critical bugs.

Stop Hand-Partitioning Disks: Practical systemd-repart on Linux

Stop Hand-Partitioning Disks: Practical systemd-repart on Linux You ship a minimal OS image. The target disk is 64 GB, 256 GB, or 2 TB. Root is still 8 GB. Swap does not exist.

  • systemd-repart simplifies disk partitioning for Linux OS images
  • Configurations defined in repart.d/.conf files, no fragile installer hooks
  • Incremental and idempotent tool, operates on GPT disks

PKCE Downgrade Attack: When the Authorization Server Accepts Both Flows

Two CVEs against the same identity provider, filed six months apart. CVE-2023-48228 and CVE-2024-23647, both against authentik, describe the same failure: the server accepted PKCE in one request and…

  • CVE-2023-48228 vulnerability in authentik versions 2023.10.4 and 2023.8.5 allows PKCE downgrade.
  • CVE-2024-23647 vulnerability in authentik versions 2023.10.6 and 2023.8.6 permits PKCE bypass.

Your agent orchestrator is a black box. Mine is a folder.

Status: experimental. I started Agent Board last night. The protocol will probably change. There is a point with agent orchestration software where you stop feeling like you are shipping software and…

  • Agent Board presents projects as folders with Markdown files for each task.
  • Five status columns - todo, doing, review, blocked, and done - track ticket progress.
  • Explicit messaging system enables agents to communicate about each ticket.

More from Sunday 6 September →