ch
Feedback

不要被骗子欺骗!Telemetrio 会找到并标记这些频道 👉 如果想查看标记,请订阅 👈

IBM | TATA STEEL | AMAZON OA CODING SOLUTIONS

IBM | TATA STEEL | AMAZON OA CODING SOLUTIONS

前往频道在 Telegram

We provide help for all Exam... Anyone can contact me @AK_Coder for Exam clearance and interviews Trusted ✅

显示更多
2 100
订阅者
无数据24 小时
-87 天
-2130 天
帖子存档
This is the best group

I'll tell to my friends

Thank you sir

❤️👍🥳🥳🤩🤩

And tqs to team 🎉

Thanku broo...

Thank so much bro

Thanks bro 💥

🚨TCS PRA ITIS MARCH 30th FAILED CANDIDATES Can book your slot now.. Who want to clear ping me @ThorH5

import java.util.*; public class Solution{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); FruitStore[] model=new FruitStore[n]; for(int i=0;i<n;i++) { model[i]=new FruitStore(sc.nextInt(), sc.nextLine()+sc.nextLine(), sc.nextLine(), sc.nextInt()); } int arg= sc.nextInt(); if(getFruitByItemNo(model,arg)==null) System.out.println("No fruits found"); else System.out.println(getFruitByItemNo(model,arg)); if(getFruitOfMaxPrice(model)==null) System.out.println("No fruits found"); else { System.out.println(getFruitOfMaxPrice(model)); } } //1st public static FruitStore getFruitByItemNo(FruitStore[] arr, int itemNo){ FruitStore res=null; for(FruitStore f:arr) { if(f.getItemNo()==itemNo) res=f; } return res; }//end 1st //2nd public static FruitStore getFruitOfMaxPrice(FruitStore[] arr){ FruitStore[] res=Arrays.asList(arr).stream().sorted((s1,s2)->{ return s2.getPrice()-s1.getPrice(); }).toArray(size-> new FruitStore[size]); if(res.length==0) return null; return res[0]; }//end 2nd }//end solution class class FruitStore{ private int itemNo; private String name; private String color; private int price; public FruitStore() { } public FruitStore(int itemNo, String name, String color, int price) { super(); this.itemNo = itemNo; this.name = name; this.color = color; this.price = price; } public int getItemNo() { return itemNo; } public void setItemNo(int itemNo) { this.itemNo = itemNo; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public int getPrice() { return price; } public void setPrice(int price) { this.price = price; } public String toString() { return itemNo + "\n" + name + "\n" + color + "\n" + price ; } } ✅FruitStore code Java Python Telegram: @tcs_pra_ira_help

Python & unix done

Thanks cleared

Cleared tqqs

I will surely recommend u to others

U r man of ur words

IBM | TATA STEEL | AMAZON OA CODING SOLUTIONS - Telegram 频道 @ibm_mindtree_coding_solutions 的统计与分析