fa
Feedback

فریب کلاهبرداران را نخورید! تل‌متریو این کانال‌ها را شناسایی و برچسب‌گذاری می‌کند 👉 برای مشاهده برچسب، اشتراک تهیه کنید 👈

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

Thanku

❤️👍🥳🥳🤩🤩

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