Zum Hauptinhalt springen
LIVE
CVSS 7.0CVE-2026-138158 | libgphoto2 through 2.5.34 contains a stack buffer overflow in sierra_get_string_register() that lets a malicious sierra-protocol camera or USB device overwrite stack memory. When files are listed, the device can answer the file-name register with an oversized packet, writing up to 32 KB past small stack buffers to cause crashes or possible code execution.CVSS 7.7CVE-2026-138159 | edbrowse through 3.8.19 contains an integer overflow in stringAndBytes() that allows malicious servers to write past a heap buffer by sending response bodies larger than 2 GB. When a user browses to an attacker-controlled HTTP, FTP, or gopher server, the oversized body skips reallocation and corrupts the heap, causing crashes or potentially code execution.CVSS 8.5CVE-2026-138160 | Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in ReadBackupTextLen() that allows attackers to overwrite stack memory via crafted backup files. Attackers can supply overlong quoted text values decoded into a 10,000-byte stack array during convertbackup, restore, or GSM_ReadBackupFile calls, causing crashes or potential code execution.CVSS 8.5CVE-2026-138161 | Gammu before 1.45.2 contains a buffer overflow vulnerability in LoadBackup() that allows attackers to corrupt memory by supplying an overlong MD5 value in a crafted backup file. Attackers can overwrite adjacent phonebook and calendar entry pointers via strcpy() into MD5Original when files are loaded with convertbackup or restore, causing crashes or potential code execution.CVSS 7.3CVE-2026-138162 | Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in ALCATEL_EncodeString() that allows attackers to overwrite stack memory via oversized encoded phonebook text. Attackers can supply a crafted backup restored with gammu restore or addnew to an attached Alcatel phone, using GSM extension characters to crash Gammu or potentially execute code.CVSS 8.5CVE-2026-138163 | Gammu before 1.45.2 contains a heap-based buffer overflow in ReadWAPSettingsEntry() that allows attackers to corrupt heap memory via crafted backup files with excess WAP or MMS settings entries. Attackers can supply a backup with more than four TitleNN keys in a [WAPSettings] or [MMSSettings] section, loaded via convertbackup, restore, or GSM_ReadBackupFile, causing crashes or potential code execution.CVSS 4.8CVE-2026-138164 | Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in SaveBackupText() in backtext.c that allows attackers to corrupt stack memory by supplying long text fields. Attackers can craft a backup with long calendar or note fields that, when converted with gammu convertbackup, writes hex digits past the 10,000-byte stack buffer.CVSS 9.3CVE-2026-138154 | POSTAL 2 before build 26810491 contains a sandbox escape vulnerability that allows malicious Steam Workshop mods to execute code by calling ConsoleCommand with a start file URI. Attackers can ship a batch file in a mod at the predictable workshop install path and launch it via ShellExecuteW, executing commands as the player on Windows.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Vertical Order Traversal

leetcode.com Problem Statement Given the root of a binary tree, return its vertical order traversal. Rules: Nodes are grouped by their column (Horizontal…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
CVE & Threat-Kontext · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung






Problem Statement



Given the root of a binary tree, return its vertical order traversal.



Rules:




  • Nodes are grouped by their column (Horizontal Distance).

  • If multiple nodes share the same row and column, sort them by value.









Brute Force Intuition



In an interview, you can explain it like this:




Traverse every node, store its row and column information, then sort all collected nodes based on column, row, and value.




Although correct, sorting all nodes together becomes expensive.






Complexity




  • Time Complexity: O(N log N)

  • Space Complexity: O(N)









Moving Towards the Optimal Approach



Observe that every node has:




Column (Horizontal Distance)

+

Row (Depth)






If we store nodes using:




Column

↓

Row

↓

Values






we can build the answer naturally.









Pattern Recognition



Whenever you see:




  • Vertical Traversal

  • Column-wise Traversal

  • Horizontal Distance



Think:



BFS + Ordered Maps









Key Observation



Assign coordinates:




Root

↓

(Row = 0, Col = 0)






Rules:




Left Child

↓

(Row + 1, Col - 1)

--------------------

Right Child

↓

(Row + 1, Col + 1)






Store nodes as:




TreeMap<
Column,
TreeMap<
Row,
PriorityQueue<Values>
>
>












Optimal Approach






Step 1



Perform BFS.



Store:




(Node, Row, Column)












Step 2



Insert into:




column

↓

row

↓

priority queue












Step 3



Traverse:




Columns

↓

Rows

↓

Sorted Values












Optimal Java Solution






class Pair {

TreeNode node;
int row;
int col;

Pair(TreeNode node,
int row,
int col) {

this.node = node;
this.row = row;
this.col = col;
}
}

class Solution {

public List<List<Integer>> verticalTraversal(TreeNode root) {

TreeMap<Integer,
TreeMap<Integer,
PriorityQueue<Integer>>> map =
new TreeMap<>();

Queue<Pair> q = new LinkedList<>();

q.offer(new Pair(root, 0, 0));

while (!q.isEmpty()) {

Pair curr = q.poll();

map.putIfAbsent(curr.col,
new TreeMap<>());

map.get(curr.col)
.putIfAbsent(curr.row,
new PriorityQueue<>());

map.get(curr.col)
.get(curr.row)
.offer(curr.node.val);

if (curr.node.left != null)

q.offer(new Pair(
curr.node.left,
curr.row + 1,
curr.col - 1));

if (curr.node.right != null)

q.offer(new Pair(
curr.node.right,
curr.row + 1,
curr.col + 1));
}

List<List<Integer>> ans =
new ArrayList<>();

for (TreeMap<Integer,
PriorityQueue<Integer>> rows
: map.values()) {

List<Integer> list =
new ArrayList<>();

for (PriorityQueue<Integer> pq
: rows.values()) {

while (!pq.isEmpty())

list.add(pq.poll());
}

ans.add(list);
}

return ans;
}
}












Dry Run






        3
/ \
9 20
/ \
15 7






Coordinates:




9

↓

(-1,1)

3

↓

(0,0)

15

↓

(0,2)

20

↓

(1,1)

7

↓

(2,2)






Vertical Order:




9

↓

3 15

↓

20

↓

7






Answer:




[[9],[3,15],[20],[7]]












Why BFS + Ordered Maps Work?



Every node is assigned:




Column

↓

Row






TreeMap automatically sorts:




Columns

↓

Rows






PriorityQueue handles nodes that share the same row and column.









Complexity Analysis




















Metric Complexity
Time Complexity O(N log N)
Space Complexity O(N)








Interview One-Liner




Perform BFS while tracking row and column indices, then store nodes in nested TreeMaps with a PriorityQueue to maintain the required ordering.










Pattern Learned






BFS

↓

(Row, Column)

↓

Ordered Maps

↓

Vertical Traversal









Similar Problems




  • Vertical Order Traversal

  • Top View

  • Bottom View

  • Vertical Sum

  • Diagonal Traversal









Memory Trick



Think:




Node

↓

(Row, Column)

↓

TreeMap

↓

PriorityQueue

↓

Answer









Mental Model






Tree

↓

Assign Coordinates

↓

Group By Column

↓

Sort By Row

↓

Output






Whenever you hear:




"Vertical Order Traversal"




your brain should immediately think:



BFS + (Row, Column) Coordinates + TreeMap

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Cyber Threat Intelligence & Forensik

ATT&CK-Navigator · IoC-Radar & Graph

MITRE ATT&CK Matrix Navigator
1 belegte Technik
T1110TA0006 · Credential Access
Brute Force
Mitigation: M1036 Account Use Policies
Quelle: Kontext-Klassifikation des Artikeltextes · Konfidenz 85%
MFA/Passkeys aktivieren, Account-Lockouts und Passwort-Policies verschärfen, Anmeldeversuche überwachen.
Credential Access
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
3 Knoten · 2 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Community Rating &amp; Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
22 Quellen
CVE-2026-72109 | Linux Kernel up to 7.1.4 sparx5 sparx5_register_notifier_blocks allocation of resources (WID-SEC-2026-2852)
VulDB Updates vor 1 Std.
21 weitere Quellen
VulDB Updatesvor 1 Std.CVE-2026-72110 | Linux Kernel up to 7.2-rc1 BPF bpf_local_storage_destroy use after free (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72111 | Linux Kernel up to 6.12.102/6.18.39/7.1.4 BPF Verifier check_mem_access memory corruption (Nessus ID 339550 / WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72112 | Linux Kernel up to 7.1.4/7.2-rc3 BPF Ops io_uring io_install_bpf priv/ring_fd use after free (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72113 | Linux Kernel up to 7.2-rc3 bcm bcm.c bcm_release/bcm_delete_rx_op/bcm_notifier rx_reg_dev use after free (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72114 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_setup len buffer overflow (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72115 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_handler race condition (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72116 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_setup race condition (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72117 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_handler locking (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72118 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_handler race condition (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72119 | Linux Kernel up to 7.2-rc3 bcm net/can/bcm.c bcm_tx_setup race condition (WID-SEC-2026-2852) DEV Communityvor 3 Std.Knuth's moratorium on error reports: what his page says, why repeats cost time, and what curl and the Linux kernel did VulDB Updatesvor 3 Std.CVE-2026-72099 | Linux Kernel up to 7.2-rc2 dm-integrity infinite loop (Nessus ID 364704 / WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72100 | Linux Kernel up to 6.12.96/6.18.39/7.1.4/7.2-rc2 dm-integrity deadlock (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72101 | Linux Kernel up to 6.12.100/6.18.39/7.1.4/7.2-rc2 dm-integrity uninitialized pointer (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72103 | Linux Kernel up to 6.12.100/6.18.41/7.1.4/7.2-rc2 dm-crypt crypt_set_keyring_key information disclosure (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72102 | Linux Kernel up to 7.2-rc2 Device Mapper dm_early_create use after free (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72104 | Linux Kernel up to 6.18.39/7.1.4/7.2-rc2 dm-pcache parse_cache_opts null pointer dereference (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72105 | Linux Kernel up to 7.2-rc2 dm-log out-of-bounds write (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72107 | Linux Kernel up to 7.2-rc2 dm era writeset_marked out-of-bounds (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72106 | Linux Kernel up to 7.2-rc2 dm-ioctl list_version_get_info buffer overflow (Nessus ID 335743 / WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72108 | Linux Kernel up to 7.2-rc2 dm thin metadata __reserve_metadata_snap/__release_metadata_snap reference count (WID-SEC-2026-2852)
19 Quellen
The best Xbox and PC Black Friday deals you need to know about without the fluff
Latest from Windows Central vor 48 Min.
18 weitere Quellen
WIREDvor 2 Std.HexClad Pans Black Friday Sale: Save Up to $70 (2026) WIREDvor 2 Std.Oura Ring 5 Is $100 Off This Black Friday and Cyber Week (2026) Latest from TechRadarvor 2 Std.I tried 20+ Android TV VPNs this year and these are the ones I’d save on this Black Friday — VPNs for beginners, 4K streaming, and good savings CNETvor 2 Std.I Love This Fender Speaker for Its Looks and Its Bass, and It’s Still $45 Off After Black Friday WIREDvor 2 Std.Air Purifier Black Friday Sale: Levoit, Blueair (2026) Latest from TechRadarvor 2 Std.Black Friday MacBook deals 2026: even bigger savings on MacBook Neo, MacBook Pro M6, and the new PROLED MacBook Pros as Cyber Monday draws near WIREDvor 2 Std.The Best Black Friday MacBook Deals Take Up to $300 Off The Vergevor 2 Std.A tech girlie’s Black Friday guide to fabulous nails WIREDvor 3 Std.The Best Black Friday Action Camera Deals (2026) Latest from Windows Centralvor 3 Std.Bought a new PC or monitor on Black Friday? Don't plug it into a cheap power strip Latest from TechRadarvor 3 Std.Here’s the best Black Friday MacBook Air deal available right now Latest from TechRadarvor 4 Std.I've reviewed a whole host of docking stations — here are the 8 worth buying in the holiday deals now Black Friday is done Latest from TechRadarvor 4 Std.FastestVPN vs PrivadoVPN vs Windscribe: which cheap VPN should you buy this Black Friday? Latest from TechRadarvor 4 Std.Walmart's Black Friday event ends tomorrow — see the 20 best last chance deals on TVs, appliances, laptops, headphones, ahead of Cyber Monday WIREDvor 4 Std.Best JBL Black Friday Deals (2026): Save on JBL Flip 7 and More The Vergevor 3 Std.Birdbuddy’s latest smart feeders are still at their low Black Friday prices WIREDvor 4 Std.Best Black Friday Meal Kit Deals: CookUnity, Green Chef, & More Latest from TechRadarvor 4 Std.PSA: Samsung's Black Friday event is still ongoing and the retailer has actually dropped prices even further on the Galaxy S26, OLED TVs, headphones, and more
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Vertical Order Traversal

Thematisch verwandte Begriffe: Vertical, Order, Traversal · 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 ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag