Skip to content

[js] 第544天 计算从一个大数组中(如1万条数据)取出第一数据和最后一条数据的时间分别是多少? #3043

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第544天 计算从一个大数组中(如1万条数据)取出第一数据和最后一条数据的时间分别是多少?

3+1官网

我也要出题

Activity

wheatup

wheatup commented on Oct 12, 2020

@wheatup

数组的存取时间复杂度都是O(1),与索引无关

lt846786463

lt846786463 commented on Oct 20, 2020

@lt846786463
console.time('aa');
for(var i=0;i<10000;i++){console.log(i);};
console.timeEnd('aa')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@wheatup@lt846786463

        Issue actions

          [js] 第544天 计算从一个大数组中(如1万条数据)取出第一数据和最后一条数据的时间分别是多少? · Issue #3043 · haizlin/fe-interview