AI Wisdom

Tag

algorithms

7 articles tagged with “algorithms”

A/B-testinga-starA2AACRadaptive-thinkingagent-observabilityagent-patternsagent-protocolsagent-securityagent-skillsagentsAGENTS.mdaggregationaiai-gatewayAI-SearchaksalertingAlertmanageralgorithmsAnthropicAnthropic-APIAPEapi-designapi-gatewayAPI-providersapi-versioningapimAPMapp-routerapp-serviceappsecarchitectureArizearm-templatesASP.NET-Coreaspnet-coreaspnetcoreassertion-functionsassertsasyncauditauthenticationauthorizationAutoGenautomationazureAzure-APIMazure-content-safetyazure-front-doorazure-functionsAzure-OpenAIazure-policyazure-storagebatch-APIbddbeam searchBedrockbenchmarksbest-practicesbfsbi-encoderbias-detectionbicepbinary-searchbranchingbstBundlercache-componentscachingcap-theoremcapability-taggingCapitalizecascadingcase-based-reasoningchain-of-thoughtchartschatbotcheckpointingchunkingCIci-cdci-optimizationcicdclass-decoratorClaudeClaude-CodeCLAUDE.mdclean-architecturecloudcloud-securitycloudeventscode-reviewCodexcoding-agentscompactioncomparisoncompilerOptionscompliancecomposeconcurrencyconcurrent-renderingconditional-typesconsistencyconsistent-hashingconstrained-generationconstraintsconsumer-drivencontainer-registrycontainerscontent-moderationcontent-safetycontextcontext-compressioncontext-engineeringcontext-windowcontract-testingconversational-agentsCopilotcosmos-dbcost-allocationcost-controlcost-optimizationcost-per-taskcost-performanceCoTcoveragecqrscross-sessioncsharpCursorcvecypress.d.tsdapperdashboardsdastdata-fetchingdatabasesdataloaderdatasetsddddecision-frameworkdeclaration-filesdecoratorsDeepEvalDefinitelyTypeddependency-injectiondependency-scanningdeployment-slotsdeploymentsdeprecationdesign-patternsdevopsdfsdijkstradiscriminated-unionsdistributed-tracingdistributivedockerDocker-HubdocumentationDORAdotnetdotnet-9drift-detectionDSPydurable-executiondynamic-discoverydynamic-programminge2e-testingedge AIef-coreef-core-9embeddingsengineeringenvironmentsepisodic-memoryerror-budgetevalsevaluationevent-drivenevent-gridevent-hubseventingexamplesexperience-replayexperimentalDecoratorsfactualityfail-fastfaithfulnessfeature-flagsfederationfew-shotfiberfine-tuningFinOpsflaky-testsflex-consumptionfrontendfunction-callinggarakGeminiGemmagen-ai-semantic-conventionsgenericsGHCRgitGitFlowGitHubgithub-actionsgoal-decompositiongolden-signalsGoogle-DeepMindGPTgpt-4oGPT-6GPUgrammargraphgraphqlGroqgroundingGroupChatgrpcguardrailshallucinationhallucination-detectionharmful-contentharness-engineeringhclhealth-checksheapHelmhookshotchocolateHPAhttphttp2http3hybridcacheiacICLidempotencyidentityimage-scanningin-context-learningincident-responseindexesinferinferenceinfrastructureinput-validationintegrationintegration-testinginteroperabilityintrosortinvariantisolationIstiojailbreakjestjoinsjotaiJSONJSON-modejsonbjwtk8skey-remappingkey-vaultkiotaknapsackknowledge-baseKQLkubernetesKV cacheLangChainLangfuseLangGraphLangSmithlanguagelatencyleast-agencylegacy-codeLinkerdlinqLlamallama.cppLLMLLM-as-judgeLLM-monitoringLLM-securityload-balancinglogginglong-running-agentslong-term-memorylost-in-the-middlelower-boundmanaged-identitymapped-typesmaterialized-viewsMCPmemoizationmemorymemory-consolidationmergemessage-queuemessagingmeta-promptingmetadatametricsmicroservicesmicrosoftminimal-apisMistralmockingmocksModel-Context-Protocolmodel-routingmodel-selectionmodel-servingmoderationmodule-augmentationmodule-resolutionmodulesmongodbmonitoringmonorepomswMTEBmTLSmulti-agentmulti-stage-buildsmulti-tenantmultimodalmvccnarrowingnetwork-securitynextjs-16Node16normalizationnosqloauthoauth2observabilityoffline-evalsoidcOmiton-callon-deviceonline-evalsopaopen-sourceopen-weightOpenAIOpenAI-APIopenapiOpenTelemetryOPROorchestrationOTELOutlinesoutput-formatoutput-validationOWASPP99paaspackage-exportspactpactflowpage-objectsPagerDutyparsingPartialpartitioningpathspattern-matchingperformancepersonal-AIpgvectorPhiPhoenixPickPIIPII-filteringpineconepipelineplanningplaywrightpluginspolicy-as-codepollypostgresqlpricingproductionproduction-monitoringprogressive-disclosureproject-referencesprompt-cachingprompt-designprompt-engineeringprompt-injectionprompt optimisationpromptfooprotobufpulumipythonQdrantqualityquality-gatesquality-scorequantizationqueuesRAGRAG-evaluationRAGASrate-limitingreactreact-19react-compilerreact-internalsreact-queryreact-server-componentsrealtimereasoningreasoning-effortRecordrecursionrecursive-typesred-blackred-green-refactorred teamingredisreflectionregression-testingrelease-managementreplanningresource-limitsResponses-APIrestreusable-workflowsrlsrolling-updatesruntime-safetysaga-patternsandboxingsastsbomscaleschemaschema-designschema-validationSDKsdlcsearchsecrets-managementsecuritysecurity-testingself-consistencyself-hostingSemantic-Kernelsemantic-similarityserializableserver-actionsserverlessservice-busservice-meshshardingshortest-pathsidecar-proxysignalrSKILL.mdSLISLMSLOslopsquattingsnapshot-testingsoftware-designsortingspec-driven-developmentspeculative-decodingspiessqlstabilitystate-graphstate-managementstreamingstreamsstrict-modestridestring-typesstructured-loggingstructured-outputstubssummarisationsupertestsupply-chainsystem-designtail-calltanstack-querytask-framingTC39tddtemplate-literalstemplatesterraformtest-architecturetest-doublestest-pyramidtestcontainerstestingtesting-patternstesting-strategythreat-modelingtoken-buckettoken-budgettoken-economicstoken-limittoken-maskingtoken-trackingtokenstokens-per-secondtool-callingtool-registrytool-usetopological-sortToTtoxicitytracingtrajectorytransactionstree-of-thoughttreestrietrunk-basedtsconfigTTFTtype-guardstype-narrowingtype-predicatestype-safe-routestype-systemtype-transformstypestypescriptunit-testingusage-metricsuser-feedbackutility-typesvalidationvalkeyvaluesvaultvector-dbvector-searchvector-storevendor-neutralverificationversion-controlversioningVertex-AIvisual-regressionvitestvLLMvoice-agentsvulnerabilitiesweaviateweb-apiweb-securityWebLLMwebsocketswindow-functionsWindsurfwiremockworkflowsworking-memoryworkload-identityworkspacesxunityarpzero-shotzero-trustzodzustand
Algorithms & DS
Binary search with one invariant: the half-open range low to high shrinks each step using an overflow-safe midpoint until low equals high at the lower bound, finding a position in 10 million sorted items in about 24 comparisons.Binary search with one invariant: the half-open range low to high shrinks each step using an overflow-safe midpoint until low equals high at the lower bound, finding a position in 10 million sorted items in about 24 comparisons.

Binary Search: One Template That Solves Every Variant

Intermediate

Half-open [low, high) invariant, lower-bound and upper-bound, first/last occurrence, binary search on the answer, floating-point search, and the BCL helpers.

Updated 12 min
Read →
Algorithms & DS
Sorting done right: use the library sort with a chained comparator that never subtracts, a stable sort or unique final key for deterministic ties, and sort large data in the database or stream it instead of loading it into memory.Sorting done right: use the library sort with a chained comparator that never subtracts, a stable sort or unique final key for deterministic ties, and sort large data in the database or stream it instead of loading it into memory.

Sorting in 2026: Introsort, Stability, and When to Reach for Radix

Intermediate

.NET introsort vs LINQ stable OrderBy, comparator rules (never a - b), 0/1 vs unbounded knapsack-style iteration, counting sort, and external merge sort for data > RAM.

Updated 13 min
Read →
Algorithms & DS
Safe recursion over a category tree: every call has a base case and makes progress, a visited set detects cycles in imported data, an explicit stack replaces the call stack for unbounded depth, and memoisation removes repeated work.Safe recursion over a category tree: every call has a base case and makes progress, a visited set detects cycles in imported data, an explicit stack replaces the call stack for unbounded depth, and memoisation removes repeated work.

Recursion: When It's Elegant, When It's a Stack Overflow

Intermediate

Base/recursive/combine, memoization vs iteration, why .NET doesn't reliably tail-call optimize, and converting recursion to an explicit Stack<T> for adversarial depth.

Updated 12 min
Read →
Algorithms & DS
Dynamic programming for edit distance: define the subproblem, write the recurrence, fill a table bottom-up so each cell is computed once, keep only two rows, and stop early when a row exceeds the allowed distance.Dynamic programming for edit distance: define the subproblem, write the recurrence, fill a table bottom-up so each cell is computed once, keep only two rows, and stop early when a row exceeds the allowed distance.

Dynamic Programming: State, Recurrence, Base Case, Order

AdvancedPRO

Top-down memoization vs bottom-up tables, coin change, 0/1 knapsack with reverse iteration, edit distance, LIS in O(n log n), and reconstructing the solution.

Updated 15 min
Read →
Algorithms & DS
Choosing a tree: a trie with top completions stored at each node serves prefix autocomplete, a self-balancing tree keeps ordered data logarithmic whatever the insert order, and stored data uses the database’s B-tree indexes.Choosing a tree: a trie with top completions stored at each node serves prefix autocomplete, a self-balancing tree keeps ordered data logarithmic whatever the insert order, and stored data uses the database’s B-tree indexes.

Trees: BSTs, Balance, and Why SortedDictionary Is Red-Black

Intermediate

BST vs self-balancing (red-black, AVL), B-trees in databases, heaps with PriorityQueue, tries for prefix queries, and iterative traversals that don't blow the stack.

Updated 13 min
Read →
Algorithms & DS
Graph traversal on service dependencies: Kahn’s topological sort produces a deploy order and reports cycles as leftover nodes, BFS lists the blast radius by hops, and every traversal keeps a visited set.Graph traversal on service dependencies: Kahn’s topological sort produces a deploy order and reports cycles as leftover nodes, BFS lists the blast radius by hops, and every traversal keeps a visited set.

Graph Traversal: BFS, DFS, Topological Sort, and the Visited Set

Intermediate

Adjacency list vs matrix, BFS for unweighted shortest path, DFS recursive vs iterative, Kahn's topological sort, three-colour cycle detection, and connected components.

Updated 13 min
Read →
Algorithms & DS
Dijkstra’s shortest path for delivery routing: start at distance zero, repeatedly pop the closest junction from a min-heap, skip stale entries, relax each road by travel minutes, and stop when the destination is popped; A* adds a distance estimate.Dijkstra’s shortest path for delivery routing: start at distance zero, repeatedly pop the closest junction from a min-heap, skip stale entries, relax each road by travel minutes, and stop when the destination is popped; A* adds a distance estimate.

Dijkstra in C#: PriorityQueue, A*, and Why Negative Edges Break It

AdvancedPRO

Production Dijkstra with .NET PriorityQueue and the skip-stale pattern, path reconstruction, A* with admissible heuristics, multi-source variants, and Bellman-Ford for negatives.

Updated 14 min
Read →