展开全部
Map<String, Integer> map1 = new HashMap<String, Integer>();
String[] a1 =
new String[]{"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
for(int i=0;i<a1.length;i++){
map1.put(a1[i],i);
}
System.out.println(a1[a1.length-(map1.get("b")+1)]);
我用java写的 不明白再Q我吧 381363902
刚刚写了 map1.get("b") "b"就是你要输入的字符
要是输入多的话就循环呗
String[] a1 =
new String[]{"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
for(int i=0;i<a1.length;i++){
map1.put(a1[i],i);
}
System.out.println(a1[a1.length-(map1.get("b")+1)]);
我用java写的 不明白再Q我吧 381363902
刚刚写了 map1.get("b") "b"就是你要输入的字符
要是输入多的话就循环呗
TableDI
2024-07-18 广告
2024-07-18 广告
当我们谈到Python与Excel的拆分时,通常指的是使用Python的库来读取Excel文件中的数据,然后根据某种逻辑(如按行、按列、按特定值等)将数据拆分成多个部分或输出到新的Excel文件中。上海悉息信息科技有限公司在处理这类任务时,...
点击进入详情页
本回答由TableDI提供
展开全部
map先存好就行了。
例如
Map map=new HashMap();
map.put("a","z")
map.put("b","y");
.
.
.
.
map.put("z","a");
然后按照输入的直接从map里去就行了。
时间复杂度是线性的O(n)
例如
Map map=new HashMap();
map.put("a","z")
map.put("b","y");
.
.
.
.
map.put("z","a");
然后按照输入的直接从map里去就行了。
时间复杂度是线性的O(n)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
MD5
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询