下面使用队列和双端队列类的实现:consteliminatedList=[];for(leti=0;i1){for(leti=0;i1){firstChar=deque.removeFront();lastChar=双端队列。删除返回();如果(firstChar!==lastChar){返回false;}}返回真;}
队列:击鼓传花;双端队列:回文校验相关文章