博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Build a key-value data structure which can perform lookup and rangeLookup(key1, key2)
阅读量:4184 次
发布时间:2019-05-26

本文共 517 字,大约阅读时间需要 1 分钟。

Build a key-value data structure which can perform following 2 functions 

- lookup 

- rangeLookup(key1, key2)

-----------------------------------------------------------------------

We can implement it by using a combination of HashMap and BST. HashMap will contain entry for key-value pair and BST only keys. All keys will be maintained in BST (sorted order). 

lookup(Key): Make a simple lookup in to HashMap 
rangeLookup() - It will be in two parts - 
Keys[] rage(Key1, Key 2) from BST 
Entry[] lookups(Keys[]) in HashMap

转载地址:http://iwboi.baihongyu.com/

你可能感兴趣的文章
查看数据库
查看>>
SQLite 数据库
查看>>
行业应用
查看>>
工作的常识
查看>>
java里面获取map的key和value的方法
查看>>
积累20180203
查看>>
MySQL里获取当前week、month、quarter的start_date/end_date
查看>>
Mysql中DATE_SUB 使用方法结合查询一天内,一周内,一月内的信息实例讲解
查看>>
异构数据源海量数据交换工具-Taobao DataX 下载和使用
查看>>
代理模式解析,静态代理、动态代理一文全都告诉你
查看>>
我是如何从电脑小白走上编程之路
查看>>
想成为优秀的Java程序员,你需要读哪些书?
查看>>
Java并发| Atomic包下的原子操作类使用与原理解析
查看>>
Mac M1 安装 iTerm2+Oh My Zsh+zsh-syntax-highlighting 真香!
查看>>
M1芯片Mac 安装git
查看>>
M1芯片Mac Homebrew 安装
查看>>
一篇文章看懂ZooKeeper内部原理
查看>>
全面理解Java内存模型
查看>>
Java类型信息详解
查看>>
深入理解Java线程池
查看>>