open-menu closeme
Home
Archives
About
instagram twitter github rss
  • ALGORITHM SERIES | Use One Stack To Sort Another Stack

    calendar Aug 1, 2022 · 3 min read · algorithm English  ·
    Share on: twitter facebook linkedin copy

    Requirements A stack whose elements are of type integer now wants to sort the stack from top to bottom in order from smallest to largest, and only one stack is allowed to be requested. Other than that, new variables can be requested, but no additional data structures can be requested. How to complete the sorting? …


    Read More
  • ALGORITHM SERIES | Dog-Cat Queue

    calendar Jun 7, 2022 · 7 min read · algorithm English  ·
    Share on: twitter facebook linkedin copy

    Requirements Dog and cat have implemented the Pet interface, you can use getPetType() to view the corresponding animal type; NewDog(), NewCat() can create new dog and cat objects respectively. 1type Pet interface { 2 getPetType() string 3} 4 5type fatherPet struct { 6 Type string 7} 8 9func (fp *fatherPet) getPetType() …


    Read More
  • ALGORITHM SERIES | How To Inverse Order A Stack Using Only Recursive Functions And Stack

    calendar Jun 5, 2022 · 2 min read · algorithm English  ·
    Share on: twitter facebook linkedin copy

    Requirements A stack is pressed into 1, 2, 3, 4, 5, then from the top of the stack to the bottom of the stack is 5, 4, 3, 2, 1. After transposing this stack, from the top of the stack to the bottom of the stack is 1, 2, 3, 4, 5, that is, to achieve the reverse order of the stack elements, but only with recursive …


    Read More
  • ALGORITHM SERIES | Queue Composed Of Two Stacks

    calendar Jun 4, 2022 · 3 min read · algorithm English  ·
    Share on: twitter facebook linkedin copy

    Requirements Write a class that implements a queue with two stacks and supports the basic operations of a queue: add, poll, peek Solving Ideas stacks are characterized by last-in-first-out, queues are characterized by first-in-first-out one stack as a press-in stack, the other stack as a pop-up stack, as long as the …


    Read More
  • ALGORITHM SERIES | Designing A Stack With 'getMin' Function

    calendar Jun 2, 2022 · 4 min read · algorithm English  ·
    Share on: twitter facebook linkedin copy

    Requirements the time complexity of pop, push, getMin operations are O(1) the design of the stack type can use the ready-made stack structure Solving Ideas use two stacks, starkData and stackMin compare the size of the top data of stackMin with that of starkData each time it is pressed in, and press the new minimum …


    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»

Featured Posts

  • Kubernetes 存储管理
  • Golang 核心知识点详解文档
  • Kubernetes 中 GPU 虚拟化与 NVIDIA GPU Operator 管理概述
  • Kubernetes 中 Cilium 网络架构详解与流量处理流程
  • 两个有序集合的合并
  • Go map 底层实现与冲突处理
  • Go Channel 是线程安全的吗?
  • Go内存逃逸与内存泄露详解

Recent Posts

Categories

ALGORITHM 15 KUBERNETES 12 GOLANG 7 SHORTHAND 4 LINUX 3 PYTHON 2 ALGOIITHM 1 ANSIBLE 1 APIGATEWAY 1 CONTAINERD 1 DOCKER 1 ETCD 1 GIT 1 JAVA 1
All Categories
ALGOIITHM1 ALGORITHM15 ANSIBLE1 APIGATEWAY1 CONTAINERD1 DOCKER1 ETCD1 GIT1 GOLANG7 JAVA1 KUBERNETES12 LINUX3 PROMETHEUS1 PYTHON2 SHORTHAND4 VIM1
[A~Z][0~9]

Tags

中文 33 ALGORITHM 16 KUBERNETES 13 ENGLISH 12 GOLANG 7 SHORTHAND 4 LINUX 3 ETCD 2 PYTHON 2 ABOUT 1 ANSIBLE 1 APIGATEWAY 1 APISERVER 1 BAILIYINGQI 1
All Tags
ABOUT1 ALGORITHM16 ANSIBLE1 APIGATEWAY1 APISERVER1 BAILIYINGQI1 CONTAINERD1 CONTROLLER-MANAGER1 ENGLISH12 ETCD2 GIT1 GOLANG7 JAVA1 KUBERNETES13 LINUX3 PROMETHEUS1 PYTHON2 SCHEDULER1 SHORTHAND4 VIM1 中文33
[A~Z][0~9]

Copyright  . All Rights Reserved

to-top