AI 资讯
Binary Tree PreOrder Traversal
leetcode.com Problem Statement Given the root of a binary tree, return its preorder traversal. Preorder Traversal follows: Root ↓ Left ↓ Right Brute Force Intuition In an interview, you can explain it like this: Visit the current node first, then recursively traverse the left subtree followed by the right subtree. Recursion naturally follows the preorder sequence. Complexity Time Complexity: O(N) Space Complexity: O(H) Where: N = Number of Nodes H = Height of Tree Recursive Code class Solution { public List < Integer > preorderTraversal ( TreeNode root ) { List < Integer > ans = new ArrayList <>(); preorder ( root , ans ); return ans ; } private void preorder ( TreeNode root , List < Integer > ans ) { if ( root == null ) return ; ans . add ( root . val ); preorder ( root . left , ans ); preorder ( root . right , ans ); } } Moving Towards the Optimal Iterative Approach Instead of recursion, we can use a stack. Since preorder visits: Root ↓ Left ↓ Right we should process the root immediately. To ensure the left subtree is processed first, push the right child before the left child . Pattern Recognition Whenever you see: Preorder Traversal Simulate Recursion Think: Stack Key Observation Stack follows: LIFO To visit: Left First push: Right First ↓ Left Second so that left is popped first. Optimal Java Solution class Solution { public List < Integer > preorderTraversal ( TreeNode root ) { List < Integer > ans = new ArrayList <>(); if ( root == null ) return ans ; Stack < TreeNode > st = new Stack <>(); st . push ( root ); while (! st . isEmpty ()) { TreeNode node = st . pop (); ans . add ( node . val ); if ( node . right != null ) st . push ( node . right ); if ( node . left != null ) st . push ( node . left ); } return ans ; } } Dry Run 1 / \ 2 3 / \ 4 5 Stack: 1 Visit: 1 Push: 3 2 Visit: 2 Push: 5 4 Traversal: 1 ↓ 2 ↓ 4 ↓ 5 ↓ 3 Answer: [1,2,4,5,3] Why Stack Works? A stack processes the most recently added node first. By pushing: Right Child ↓ Left Child the left child
AI 资讯
Thiel Capital’s Jack Selby nabs stakes in hot startups like Etched through Arizona connections
Selby's VC firm Copper Sky Capital is currently raising a $300 million second fund, according to a regulatory filing.
AI 资讯
Jersey Mike’s IPO illustrates how bad the AI hype has become
Just for kicks, I took a look at Jersey Mike's IPO documents. Surely a sandwich shop would have no need to mention AI. But lo and behold.
AI 资讯
Anthropic is discussing a new custom chip with Samsung
The news comes about a week after OpenAI announced its own custom AI chip in a partnership with Broadcom.
AI 资讯
Popular TV-tracking app TV Time is shutting down as company focuses on AI
TV Time, the popular TV-tracking app, is shutting down on July 15 as parent company Whip Media pivots toward enterprise AI products.
AI 资讯
Microsoft launches its own AI deployment company with $2.5 billion commitment
Microsoft follows Amazon, OpenAI, and Anthropic with its new AI deployment group.
开源项目
Apple is reportedly planning new iPad Pro and MacBook Pro releases early next year
Apple is readying several new iPad Pro tablets, and a budget-friendly MacBook Pro, reports suggest.
科技前沿
The Best July 4 Grill and Griddle Deals: Weber, Traeger, Recteq
Fourth of July weekend is the last great grill and griddle sale of the summer, including $250 off my favorite pellet smoker.
创业投融资
Ashton Kutcher leaving Sound Ventures to launch new VC firm with Morgan Beller
The actor and investor is joining forces with Morgan Beller, who was previously a GP at NFX, to invest in early-stage startups.
AI 资讯
Neocloud Together AI raises $800M, leaps to $8.3B valuation
The AI neocloud provider, which specializes in hosting open source models, last raised at a $3.3 billion valuation in early 2025.
产品设计
Builders Stage agenda revealed: Practical strategies for scaling startups at TechCrunch Disrupt 2026
The Builders Stage is returning to TechCrunch Disrupt 2026, bringing together 10,000+ founders, startup operators, and investors for practical conversations. and Q&A on what it takes to build and scale successful companies. Register now to save up to $330.
AI 资讯
OpenClaw is finally available on Android and iOS
The free open source agentic program is finally invading your phone.
AI 资讯
Nvidia competitor Etched hits $5B valuation, $1B in sales for AI chip
Nvidia AI chip competitor Etched says it has already booked $1 billion under contract for the inference systems powered by its chip.
AI 资讯
Acti puts AI agents directly into your smartphone keyboard
Acti is betting the smartphone keyboard is the next home for AI assistants. The startup's new keyboard for iOS and Android works across apps and lets users create custom AI-powered shortcuts using natural language.
AI 资讯
Bitcoin Isn’t Just Money It’s One of the Most Interesting Systems Engineers Can Study
When most people hear Bitcoin , the conversation usually starts with price. But for developers, Bitcoin is much more than a chart. Bitcoin is a distributed system operating without a central authority. It combines networking, cryptography, game theory, economics, and software engineering into a protocol that has remained operational for years while processing value globally. As a software developer, what fascinates me most is not speculation it’s the architecture. Some concepts every developer can appreciate: ⚡ Distributed Consensus Thousands of nodes independently verify the same rules without trusting each other. 🔐 Cryptography in Practice Digital signatures make ownership verifiable without revealing private keys. ⛏️ Proof of Work A mechanism that converts computation into security and coordination. 🌍 Open Source at Global Scale Anyone can inspect the code, run a node, contribute, or build on top of the ecosystem. 📦 Immutability Through Design Data integrity is achieved through incentives, validation rules, and chained blocks. Studying Bitcoin changes how you think about: System reliability Security models Network design Incentive structures Building software that survives failure Whether you plan to build in blockchain or not, Bitcoin is worth studying because it teaches principles that extend far beyond finance. Curious to hear from other developers: What concept in Bitcoin architecture changed the way you think about software systems?
AI 资讯
Amazon launches new $1 billion FDE org, following OpenAI and Anthropic
Engineers on the new team will embed within companies to deploy purpose-built agents, focusing on fast deployments and customer self-sufficiency.
科技前沿
The 2 Best Slushie Machines of 2026: Now With Soft Serve
The original Ninja Slushi has been replaced! The new best slushie machines chill faster and make soft serve.
AI 资讯
How to Forecast End-of-Day Call Center Performance
By mid-afternoon, you can know where your floor will close by end of day — accurately enough to make the remaining hours a decision, not a guess. Here's how intraday performance forecasting works and what it takes to build it. The Problem With Yesterday's Numbers Most contact centers have end-of-day metrics. Dials, connects, conversion rate against target. Those numbers are accurate, useful for trend analysis, and arrive the next morning. By the time you see them, the day is already over. The decisions that drive outcomes happen during the day — in real time, when hours remain to influence the result. Do you push harder in the final stretch? Adjust campaign priority? Pull a server that's underperforming? Those decisions get made in the afternoon with one question underneath all of them: where are we going to close? If you're answering that question with yesterday's data and experienced intuition, you're working with an information deficit that compounds every day it stays open. How Intraday Forecasting Works The system records dial conversion rates at regular intervals throughout the business day. Not a snapshot at end of day. A continuous read of how the floor is performing as it performs. Every morning, before the floor opens, the model retrains. It processes the intraday conversion patterns from previous days — how conversion tends to develop through the morning, when it typically accelerates, when it softens, how afternoon performance differs from morning — and calibrates to the current operation's historical data. As the day runs, the forecast updates on a regular schedule. Each update incorporates actual conversion data that's come in, narrowing the prediction window. By mid-afternoon, with hours remaining, the model's error range has compressed enough that the closing metric is predictable within an actionable range. Not a rough estimate. A forecast with a documented accuracy track. What this changes in practice: Before the forecasting system, the afternoon c
AI 资讯
South Korean tech giants commit over $550B to ease ‘ RAMageddon’
The world's two largest memory chip companies vow to build more memory lab fabs as South Korea positions itself as an AI tech powerhouse country.
科技前沿
Kalshi sues Illinois over new tax on prediction market sports bets
Illinois now a key battleground in fight over prediction market sports bets.