STL std :: find()的内存复杂性是多少? [英] What is the memory complexity for STL std::find()?

查看:62
本文介绍了STL std :: find()的内存复杂性是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

STL std :: find()的内存复杂度是多少?



我尝试了什么:



我用谷歌搜索但找不到任何有用的结果。

What is the memory complexity for STL std::find()?

What I have tried:

I have search with google but couldn't find any useful result.

推荐答案

看看实现情况。它是一个模板,你的IDE应该能够跟随符号并向你显示源代码。



对于工作内存我会猜测只有一个循环变量除了传递的参数(通常不算作工作记忆)。
Just have a look at the implementation. It is a template and your IDE should be able to follow the symbol and show you the source.

For the work memory I would guess that there is only a loop variable besides the passed arguments (which usually did not count as work memory).


这篇关于STL std :: find()的内存复杂性是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆