1 Star 0 Fork 0

BESTI.IS.JAVA2018/20165305zhenlong

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ArrayList.java 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
public static ArrayList<String> produce_RPN(ArrayList<String> list_temp)
{
int t=0,i=0;
String tmp;
Tack mytack = new Tack(20);
ArrayList<String> lt_temp = new ArrayList<String>();
while(true)
{
tmp = list_temp.get(i++);
if(isInteger(tmp))
{
lt_temp.add(tmp);
}
else{
if(mytack.myisempty())
{
mytack.mypush(tmp);
}
else{
if(isCPriority(tmp, mytack.mypeek()))
mytack.mypush(tmp);
else{
lt_temp.add(mytack.mypop());
mytack.mypush(tmp);
}
}
}
if(i>=list_temp.size())
{
while(!mytack.myisempty())
lt_temp.add(mytack.mypop());
System.out.println(transform_string(list_temp));
list_temp = lt_temp;
System.out.println(list_temp);
return list_temp;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/BESTI-IS-JAVA-2018/20165305zhenlong.git
git@gitee.com:BESTI-IS-JAVA-2018/20165305zhenlong.git
BESTI-IS-JAVA-2018
20165305zhenlong
20165305zhenlong
master

搜索帮助