Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let arrays = gets();
- let isSymmetric = false;
- for(let i = 0; i < arrays; i++){
- let arr = gets().split(' ').map(Number)
- for(let j = 0; j < arr.length; j++){
- if(arr[j] === arr[arr.length - 1 - j]){
- isSymmetric = true;
- }else{
- isSymmetric = false;
- break;
- }
- }
- if(isSymmetric){
- console.log('Yes');
- }else{
- console.log('No');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement