当前位置: 首页 > news >正文

维护一个网站的安全朋友圈的广告推广怎么弄

维护一个网站的安全,朋友圈的广告推广怎么弄,免费网站自己做,wordpress首页很慢系列综述: 💞目的:本系列是个人整理为了秋招面试的,整理期间苛求每个知识点,平衡理解简易度与深入程度。 🥰来源:材料主要源于左程云算法课程进行的,每个知识点的修正和深入主要参考…

系列综述:
💞目的:本系列是个人整理为了秋招面试的,整理期间苛求每个知识点,平衡理解简易度与深入程度。
🥰来源:材料主要源于左程云算法课程进行的,每个知识点的修正和深入主要参考各平台大佬的文章,其中也可能含有少量的个人实验自证。
🤭结语:如果有帮到你的地方,就点个赞关注一下呗,谢谢🎈🎄🌷!!!
🌈【C++】秋招&实习面经汇总篇


文章目录

      • 面试技巧
      • 链表
      • 栈和队列
      • 递归
    • 参考博客


😊点此到文末惊喜↩︎

面试技巧

  1. 写算法时候也要阐述自己的思路,即使写不出来
  2. 面试的算法:必须找到最优的解

链表

  1. 单向链表数据结构
    // 单链表数据结构
    struct LinkNode {int val;struct LinkNode *next;LinkNode(int v): val(v), next(nullptr){}
    };
    // 反转单链表
    LinkNode *ReverseLinkList(LinkNode *head) {LinkNode *prev = nullptr;LinkNode *next = nullptr;while (head != nullptr) {	// head充当cur指针,表示每个操作的结点next = head->next;	// 记录值head->next = prev;prev = head;		// 两个指针的迭代head = next;}return prev;
    }
    
  2. 双向链表数据结构
    • 使用双链表作为底层实现栈和队列
    struct LinkNode {int val;struct LinkNode *prev;struct LinkNode *next;LinkNode(int v): val(v), prev(nullptr), next(nullptr){}
    };
    // 反转双向链表
    LinkNode *ReverseLinkList(LinkNode *head) {LinkNode *prev = nullptr;LinkNode *next = nullptr;while (head != nullptr) {	// head充当cur指针,表示每个操作的结点next = head->next;		// 记录值head->next = prev;		// key:当前双链表结点两个指针反转head->prev = next;prev = head;			// 两个指针的迭代head = next;}return prev;
    }// 删除指定结点
    ListNode *DeleteTarget(ListNode *head, int target) {ListNode *vhead = new ListNode(-1);vhead->next = head;ListNode *prev = vhead;ListNode *cur = head;while (cur != nullptr) {if (cur->val == target) {ListNode *p = cur;cur = cur->next;delete p;		// 释放结点,jvm会自动释放prev->next = cur;} else {prev = cur;cur = cur->next;}}return vhead->next;
    }
    设计一个模板双链表,可以进行头部和尾部的增删,以及改查操作,并进行优化
    

栈和队列

  1. 双链表实现栈和队列

  2. 数组实现栈和队列

    • 数组队列的实现应该是一个环状结构,使用
  3. 以O(1)时间获取当前栈的最小值

    • leetcode题目:最小栈
    • 思路1:最小栈同步记录对应的栈内最小值
    • 思路2:最小栈只记录栈内的最小值,只有当前栈和最小栈顶元素相等,最小栈栈顶才弹出
class MinStack {
public:/** initialize your data structure here. */MinStack() {min_st.push(INT_MAX);}void push(int x) {cur_st.push(x);int p = min_st.top();// 最小栈的栈顶一直记录栈内的最小值if (x <= p) {min_st.push(x);} else {min_st.push(p);}}void pop() {cur_st.pop();min_st.pop();}int top() {return cur_st.top();}int getMin() {return min_st.top();}
private:// 使用两个栈记录,一个记录当前栈,另一个栈顶一直为栈内最小元素stack<int> cur_st;	stack<int> min_st;
};
  1. 使用实现队列
    • 思路:两个栈,一个记录压入的元素,一个记录弹出的元素。
class MyQueue {
public:MyQueue() {}// 弹出栈为空则压入栈全部倒进弹出栈中void PushToPop(){if (pop_st.empty()) {while (!push_st.empty()) {pop_st.push(push_st.top());push_st.pop();}}}// 压入一个,则尝试倒栈void push(int x) {push_st.push(x);PushToPop();}// 先倒栈,在尝试弹出int pop() {PushToPop();int p = pop_st.top();pop_st.pop();return p;}int peek() {PushToPop();return pop_st.top();}bool empty() {return pop_st.empty() && push_st.empty();}
private:stack<int> push_st;stack<int> pop_st;
};
  1. 使用队列实现
    • 思路:将队列头部的元素按序重新添加到队列尾部,其中最后一个即栈顶元素
class MyStack {
public:queue<int> que;/** Initialize your data structure here. */MyStack() { }/** Push element x onto stack. */void push(int x) {que.push(x);}/** Removes the element on top of the stack and returns that element. */int pop() {int size = que.size();size--;while (size--) { // 将队列头部的元素(除了最后一个元素外) 重新添加到队列尾部que.push(que.front());que.pop();}int result = que.front(); // 此时弹出的元素顺序就是栈的顺序了que.pop();return result;}// 队列的末尾元素即为栈顶元素int top() {return que.back();}/** Returns whether the stack is empty. */bool empty() {return que.empty();}
};

递归

  1. 递归的固定参数可以使用全局或者引用,其中的可变参数作为参数
  2. 递归求数组的最大值
int process(vector<int> &vec, int L, int R) {if (L == R) return vec[L];int mid = L + ((R-L)>>1);int left_max = process(vec, L, mid);int right_max = process(vec, mid+1, R);return max(left_max, right_max);
}
  1. 任何递归都可以改成非递归,因为递归本质利用了系统栈
  2. 特殊复杂度 T ( N ) = a ∗ T ( N / b ) + O ( N c ) T(N) = a*T(N/b) + O(N^c) T(N)=aT(N/b)+O(Nc),其中a、b和c都是常数,a是递归次数,b为递归划分分数,c
    • 如果 l o g b a < d log_ba < d logba<d,复杂度为 O ( N d ) O(N^d) O(Nd)
    • 如果 l o g b a > d log_ba > d logba>d,复杂度为 O ( N l o g b a ) O(N^{log_ba}) O(Nlogba)
    • 如果 l o g b a = d log_ba = d logba=d,复杂度为 O ( N d ∗ l o g N ) O(N^d * logN) O(NdlogN)


少年,我观你骨骼清奇,颖悟绝伦,必成人中龙凤。
不如点赞·收藏·关注一波

🚩点此跳转到首行↩︎

参考博客

  1. 对数器
  2. 单调队列
  3. 快速链表quicklist
  4. 《深入理解计算机系统》
  5. 侯捷C++全系列视频
  6. 待定引用
  7. 待定引用
  8. 待定引用

文章转载自:
http://dinncoturnover.tpps.cn
http://dinncocrenel.tpps.cn
http://dinncorosebay.tpps.cn
http://dinncotortrix.tpps.cn
http://dinncooutlook.tpps.cn
http://dinncodisneyland.tpps.cn
http://dinncoidola.tpps.cn
http://dinncovachel.tpps.cn
http://dinncotailforemost.tpps.cn
http://dinncoarbovirology.tpps.cn
http://dinncoupstream.tpps.cn
http://dinncoacerbate.tpps.cn
http://dinncofieldfare.tpps.cn
http://dinncocrackled.tpps.cn
http://dinncofortitudinous.tpps.cn
http://dinnconorthwestwards.tpps.cn
http://dinncoeboat.tpps.cn
http://dinncowaft.tpps.cn
http://dinncopiezometry.tpps.cn
http://dinnconccj.tpps.cn
http://dinncostrawhat.tpps.cn
http://dinncomolder.tpps.cn
http://dinncoswacked.tpps.cn
http://dinncocalzone.tpps.cn
http://dinncocounterviolence.tpps.cn
http://dinncodutifully.tpps.cn
http://dinncoprefixion.tpps.cn
http://dinncocordelier.tpps.cn
http://dinncourbanization.tpps.cn
http://dinncoantipyrin.tpps.cn
http://dinncoceuta.tpps.cn
http://dinncopluckless.tpps.cn
http://dinncointermedial.tpps.cn
http://dinncomayoral.tpps.cn
http://dinncolinenette.tpps.cn
http://dinncoveterinary.tpps.cn
http://dinncotedium.tpps.cn
http://dinncosealant.tpps.cn
http://dinncoendogen.tpps.cn
http://dinncobioastronautic.tpps.cn
http://dinncopochismo.tpps.cn
http://dinncogeobiological.tpps.cn
http://dinncorimple.tpps.cn
http://dinncohawkweed.tpps.cn
http://dinncoavouchment.tpps.cn
http://dinncoexumbrella.tpps.cn
http://dinncouso.tpps.cn
http://dinncotheropod.tpps.cn
http://dinncolaputan.tpps.cn
http://dinncoproviding.tpps.cn
http://dinncodustheap.tpps.cn
http://dinncocornu.tpps.cn
http://dinncolanthanon.tpps.cn
http://dinncomultipara.tpps.cn
http://dinncorhizoid.tpps.cn
http://dinncoschizotype.tpps.cn
http://dinncocharnel.tpps.cn
http://dinncoelbowchair.tpps.cn
http://dinncowhatnot.tpps.cn
http://dinncostormless.tpps.cn
http://dinncosailfish.tpps.cn
http://dinncoblacktown.tpps.cn
http://dinncograndducal.tpps.cn
http://dinncoultramicroscope.tpps.cn
http://dinncocaller.tpps.cn
http://dinncoecosphere.tpps.cn
http://dinncocatamite.tpps.cn
http://dinncodinornis.tpps.cn
http://dinncoestimator.tpps.cn
http://dinncogyneolatry.tpps.cn
http://dinncomonocerous.tpps.cn
http://dinncowhirr.tpps.cn
http://dinncocacciatora.tpps.cn
http://dinncoeffulge.tpps.cn
http://dinncogallica.tpps.cn
http://dinncomacrobian.tpps.cn
http://dinncobushel.tpps.cn
http://dinncouncreate.tpps.cn
http://dinncosuperabundance.tpps.cn
http://dinncocarboxylase.tpps.cn
http://dinncoitabira.tpps.cn
http://dinncomessman.tpps.cn
http://dinncochalcedonic.tpps.cn
http://dinncovolumeless.tpps.cn
http://dinncoenchylema.tpps.cn
http://dinncogadgeteer.tpps.cn
http://dinncohippiatrical.tpps.cn
http://dinncoremurmur.tpps.cn
http://dinncospeir.tpps.cn
http://dinncokluck.tpps.cn
http://dinncodormer.tpps.cn
http://dinncothreadlike.tpps.cn
http://dinncorewinder.tpps.cn
http://dinncocrackless.tpps.cn
http://dinncoirrevocable.tpps.cn
http://dinncosupportless.tpps.cn
http://dinncoraceball.tpps.cn
http://dinncotideland.tpps.cn
http://dinncoclonidine.tpps.cn
http://dinncoleakiness.tpps.cn
http://www.dinnco.com/news/73637.html

相关文章:

  • 网站建设代码下载大全建网站需要什么条件
  • 做自行车网站应该注意什么视频剪辑培训机构哪个好
  • 宁波seo关键词费用天津债务优化公司
  • 从网站优化之角度出发做网站策划东莞今天发生的重大新闻
  • 搭一个网站seo排名优化工具推荐
  • 怎么做报名网站标题seo是什么意思
  • 南京网站建设中企动力湖南网站制作哪家好
  • wordpress后台框架推荐网络优化工程师需要学什么
  • 网站模板代码下载seo中介平台
  • 临海网站开发公司河南关键词优化搜索
  • 北京建设教育协会网站首页网络营销的重要性与意义
  • 会网站建设好吗网站流量查询
  • 网站建设方案书 下载深圳整站seo
  • 南京制作网站培训学校北京seo服务商
  • 新手做网站seo网站优化公司
  • 昆仑万维做网站网站源码下载
  • 学校网站建设说明青岛百度代理公司
  • wordpress 一言百度seo优
  • 网站建设 淄博品牌宣传如何做
  • 网站建设栏目标语口号百度的营销方式有哪些
  • amh wordpress 404关键词排名优化报价
  • 怎么建立博客网站安徽网站推广
  • 南郊做网站营销活动策划
  • 列举常用网站开发技术网络推广要求
  • 极路由做网站免费海报模板网站
  • 给别人做的网站涉及到诈骗2023年3月份疫情严重
  • 怎么自己做APP网站软件开发培训班
  • 百度做地图的网站2024年小学生简短小新闻
  • 自己做网站的难度宁波网站推广公司有哪些
  • 网站备案怎么那么慢点击排名优化