TCS PRA PL/SQL CODING QUESTION
11:22
TCS PRA SQL CODING QUESTION PART2
23:30
Пікірлер
@SingwithSuhas
@SingwithSuhas 6 күн бұрын
Bro plz share the coding que of Java also
@thetechyguy18
@thetechyguy18 Күн бұрын
Check playlist
@SubaM-mk9hj
@SubaM-mk9hj 7 күн бұрын
Thankyou bro for all the videos you have posted regarding coding...It helped me a lotttt.👏👏☺️
@thetechyguy18
@thetechyguy18 Күн бұрын
Thankyou for ur kind words
@abcabc-bu9rk
@abcabc-bu9rk 11 күн бұрын
is PRA and IPA different
@thetechyguy18
@thetechyguy18 Күн бұрын
Ys
@kishoreprasad91
@kishoreprasad91 27 күн бұрын
Sir my photo is not available in the application form will I able to attend the interview process or not
@thetechyguy18
@thetechyguy18 25 күн бұрын
Don't know
@abhaysinghrajput7337
@abhaysinghrajput7337 28 күн бұрын
1:38 , Answer will be WHERE. Beacause DELETE , ORDER BY , SELECT are the commands of SQL . And WHERE is not command it is the CLAUSE
@thetechyguy18
@thetechyguy18 25 күн бұрын
Ys
@PawankumarTummawar-1
@PawankumarTummawar-1 29 күн бұрын
1). At 1:47, the answer should be ---> B) True 2). At 2:53, the answer will be option ---> a), b), and d) 3). At 3:03, answer should be ---> 50 (because it is in the range of Short data type)
@thetechyguy18
@thetechyguy18 25 күн бұрын
Good research
@PawankumarTummawar-1
@PawankumarTummawar-1 Ай бұрын
At 0:32 i think the answer is not present there as all the options are wrong, the answer should be ----> None of the above as, printing A will give ---> +ve infinity printing B will give ---> 0.0 printing C will give ---> NaN
@thetechyguy18
@thetechyguy18 25 күн бұрын
Good working
@SauravKumar-hz1pg
@SauravKumar-hz1pg Ай бұрын
Average can be double data type?
@thetechyguy18
@thetechyguy18 25 күн бұрын
Ys
@lokeshthamineni8900
@lokeshthamineni8900 Ай бұрын
in question they asked to print result for 2nd method in descending order isnt it
@thetechyguy18
@thetechyguy18 25 күн бұрын
Check bro
@madmax5530
@madmax5530 Ай бұрын
Very bad logic
@thetechyguy18
@thetechyguy18 Ай бұрын
Then pls suggest a better one
@madmax5530
@madmax5530 Ай бұрын
​@@thetechyguy18 static public Hotel searchHotelByWifiOption(Hotel[] hotels,String wifi){ Hotel first=null; Hotel second = null ; for(Hotel ht:hotels){ if(ht.getWifiFacility().equalsIgnoreCase(wifi)){ if(first == null){ first = ht; } else if(ht.getTotalBill()>first.getTotalBill()){ second = first; first = ht; } else{ if(second==null || ht.getTotalBill()>second.getTotalBill() && ht.getTotalBill()<first.getTotalBill()){ second = ht; } } } } return second; }
@darkmatter2958
@darkmatter2958 28 күн бұрын
u can use refined.sort((l1,l2)->Integer.compare(l1.gettotal(),l2.gettotal())); using sort function with defined comparator as lambda function.
@darkmatter2958
@darkmatter2958 28 күн бұрын
or else without sorting you can iterate loop two times and find the second highest total object.
@madmax5530
@madmax5530 28 күн бұрын
static public Hotel searchHotelByWifiOption(Hotel[] hotels,String wifi){ Hotel first=null; Hotel second = null ; for(Hotel ht:hotels){ if(ht.getWifiFacility().equalsIgnoreCase(wifi)){ if(first == null){ first = ht; } else if(ht.getTotalBill()>first.getTotalBill()){ second = first; first = ht; } else{ if(second==null || ht.getTotalBill()>second.getTotalBill() && ht.getTotalBill()<first.getTotalBill()){ second = ht; } } } } return second; }
@saistaparveen5426
@saistaparveen5426 Ай бұрын
Bhaiya why we are taking arr[i] size 4 here input is 5 please explain me in details
@coder7047
@coder7047 Ай бұрын
4 indexes rahenge matlab 4 size aur har index mein 5 values jo define kri he
@thetechyguy18
@thetechyguy18 Ай бұрын
Thankyou bro for explaining
@kirtipawar8442
@kirtipawar8442 Ай бұрын
In the above code when we call first method In if else loop You are used once getid and then you are used name My question is why u are not used both time method or both time direct return type or Is there another reason
@thetechyguy18
@thetechyguy18 Ай бұрын
For a clean code I did like that
@kirtipawar8442
@kirtipawar8442 Ай бұрын
@thetechyguy18 ok thank you
@Urvy-K
@Urvy-K Ай бұрын
fruit fr = null; int max = Integer.MIN_VALUE; for(fruit p: f) { if(p.getrating()>par ) { if(p.getprice()>max) { max = p.getprice(); fr = p; } } } return fr; can we use this to find maximunprice???
@MOHAMEDFOWAZMMSEC
@MOHAMEDFOWAZMMSEC Ай бұрын
sir please add the question in description for all videos in the playlist
@thetechyguy18
@thetechyguy18 Ай бұрын
These were old videos and I cannot do this RN
@ayushjoshi3619
@ayushjoshi3619 Ай бұрын
2:52 d) short to int and a) byte to int also comes under automatic conversion
@thetechyguy18
@thetechyguy18 25 күн бұрын
Good
@satyashankar2599
@satyashankar2599 Ай бұрын
will these models will be enough to clear 35 mark java question in ipa
@thetechyguy18
@thetechyguy18 Ай бұрын
Ys
@aniketkadale5960
@aniketkadale5960 Ай бұрын
My code works perfect on VSCode but fails on TCS compiler. Can you check? import java.util.*; class MyC1ass { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Player[] players = new Player[4]; for (int i = 0; i < players.length; i++) { int playerId = sc.nextInt(); sc.nextLine(); String playerName = sc.nextLine(); int runs = sc.nextInt(); sc.nextLine(); String playerType = sc.nextLine(); String matchType = sc.nextLine(); players[i] = new Player(playerId, playerName, runs, playerType, matchType); } String inputPlayerType = sc.nextLine(); String inputMatchType = sc.nextLine(); int lowestRuns = findPlayerWithLowerRuns(players, inputPlayerType); if (lowestRuns > 0) { System.out.println(lowestRuns); } else { System.out.println("No such player"); } Player[] matchedPlayers = findPlayerByMatchType(players, inputMatchType); if (matchedPlayers != null) { for (Player player : matchedPlayers) { System.out.println(player.getPlayerId()); } } else { System.out.println("No Player with given matchType"); } } public static int findPlayerWithLowerRuns(Player[] players, String playerType) { int lowestRuns = Integer.MAX_VALUE; boolean found = false; for (Player player : players) { if (player.getPlayerType().trim().equalsIgnoreCase(playerType)) { lowestRuns = Math.min(lowestRuns, player.getRuns()); found = true; } } return found ? lowestRuns : 0; } public static Player[] findPlayerByMatchType(Player[] players, String matchType) { List<Player> list = new ArrayList<>(); for (Player player : players) { if (player.getMatchType().trim().equalsIgnoreCase(matchType)) { list.add(player); } } if (list.size() == 0) return null; Collections.sort(list, (p1, p2) -> Integer.compare(p2.getPlayerId(), p1.getPlayerId())); return list.toArray(new Player[0]); } } class Player { private int playerId; private String playerName; private int runs; private String playerType; private String matchType; public Player(int playerId, String playerName, int runs, String playerType, String matchType) { this.playerId = playerId; this.playerName = playerName; this.runs = runs; this.playerType = playerType; this.matchType = matchType; } public int getPlayerId() { return playerId; } public void setPlayerId(int playerId) { this.playerId = playerId; } public String getPlayerName() { return playerName; } public void setPlayerName(String playerName) { this.playerName = playerName; } public int getRuns() { return runs; } public void setRuns(int runs) { this.runs = runs; } public String getPlayerType() { return playerType; } public void setPlayerType(String playerType) { this.playerType = playerType; } public String getMatchType() { return matchType; } public void setMatchType(String matchType) { this.matchType = matchType; } }
@jashkothari6405
@jashkothari6405 Ай бұрын
Thanks bro, I cleared the assessment through your video
@thetechyguy18
@thetechyguy18 Ай бұрын
Congratulations hope u also got 80+
@college2company366
@college2company366 Ай бұрын
16:54 yaha pr kaise samajh aaya ki 2 inputs lene hain??
@thetechyguy18
@thetechyguy18 Ай бұрын
Don't know bro, I recorded that 1 yr ago chat.whatsapp.com/CIQx82A8Qti9Qu83C5CCpQ
@SonaliSingh-jy8pw
@SonaliSingh-jy8pw Ай бұрын
you forgot to check if sum was smaller than 50
@thetechyguy18
@thetechyguy18 Ай бұрын
Just checked. Maybe I have forgotten that time, you can add in if condition and sum < 50 If you have more questions just join and ask here chat.whatsapp.com/CIQx82A8Qti9Qu83C5CCpQ
@harshitha6779
@harshitha6779 Ай бұрын
I guess You should sort the array in ascending order(increasing) , so that we can get second minimum price
@thetechyguy18
@thetechyguy18 Ай бұрын
Yes, it will give but what if ur array looks likes this 1,1,2,3 in this case array logic won't work
@harshitha6779
@harshitha6779 Ай бұрын
@@thetechyguy18 It is clearly mentioned in the question. " no 2 headset will have the same price"..Thank you for the reply
@thetechyguy18
@thetechyguy18 Ай бұрын
chat.whatsapp.com/CIQx82A8Qti9Qu83C5CCpQ You can share this with other future TCSers
@kavyatamrakar1207
@kavyatamrakar1207 Ай бұрын
hidden test cases failed, what should I do?
@thetechyguy18
@thetechyguy18 Ай бұрын
Improve ur logic
@kavyatamrakar1207
@kavyatamrakar1207 Ай бұрын
​@@thetechyguy18i was expecting help, thanks wow.
@thetechyguy18
@thetechyguy18 Ай бұрын
You can share ur code in WhatsApp community I will take a look Link to join chat.whatsapp.com/CIQx82A8Qti9Qu83C5CCpQ
@meghanamdeo2718
@meghanamdeo2718 Ай бұрын
can u share pdf
@thetechyguy18
@thetechyguy18 Ай бұрын
No
@shahaanali4515
@shahaanali4515 Ай бұрын
1:38 , DELETE is a SQL command . The answer is ORDER BY.
@thetechyguy18
@thetechyguy18 Ай бұрын
Hmm right 👍
@chinmaykumar7527
@chinmaykumar7527 Ай бұрын
bro.. all of them are sql commands. there is no correct option in that question
@shahaanali4515
@shahaanali4515 Ай бұрын
@@chinmaykumar7527 ORDER BY is a clause not command
@khushichouksey253
@khushichouksey253 Ай бұрын
@@chinmaykumar7527 where is a clause and others are command
@srikantapramanik3689
@srikantapramanik3689 Ай бұрын
Can we choose a programming language between Java and Python in PRA during ILP training, or will it be provided?
@thetechyguy18
@thetechyguy18 Ай бұрын
It is based on the joining location, because most of the times I saw only 1 they use either Java/python
@adityaagarwal2324
@adityaagarwal2324 2 ай бұрын
0:48 ka answer Drop hoga Truncate -> delete all rows Drop-> delete all rows and also the structure of the table from the database Delete -> delete rows one by one or all
@thetechyguy18
@thetechyguy18 Ай бұрын
Good explanation
@Shubhamsakunde
@Shubhamsakunde 2 ай бұрын
What are doing right now bro ? ❤
@thetechyguy18
@thetechyguy18 Ай бұрын
Job bro
@prathameshamundkar4549
@prathameshamundkar4549 2 ай бұрын
Make videos on PRA syllabus of 2024. And also make vdo on 35 marks coding question in PRA in java
@Lieutenantsab
@Lieutenantsab 2 ай бұрын
Sir can i get your Instagram profile, i have some doubts
@thetechyguy18
@thetechyguy18 2 ай бұрын
the_techyguy
@ritikpathade1374
@ritikpathade1374 2 ай бұрын
bro we can use python also
@thetechyguy18
@thetechyguy18 Ай бұрын
For IPA yes
@SumitKumar-fz3gq
@SumitKumar-fz3gq 2 ай бұрын
Many of the answers is wrong i verified with chatgpt like break is not selection statement The environment variable used to set the Java path is called JAVA_HOME but you gave wrong and many more
@thetechyguy18
@thetechyguy18 2 ай бұрын
Bro, I know that but what TCS assumes correct I have mentioned here
@sandykar8714
@sandykar8714 Ай бұрын
Hello
@ridhigarg8613
@ridhigarg8613 2 ай бұрын
both java and python mcqs will come or choice?
@thetechyguy18
@thetechyguy18 2 ай бұрын
Yes for IPA there is choise
@devansh5268
@devansh5268 Ай бұрын
only java for nov batch
@upDownLearning
@upDownLearning 2 ай бұрын
import java.util.Scanner; public class Solution5 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int size = sc.nextInt(); TravelAgencies[] ta = new TravelAgencies[size]; for(int i = 0 ;i< ta.length; i++) { int regNo = sc.nextInt(); sc.nextLine(); String agencyName = sc.nextLine(); String packageType = sc.nextLine(); int price = sc.nextInt(); boolean flightFacility = sc.nextBoolean(); ta[i] = new TravelAgencies(regNo, agencyName, packageType,price,flightFacility); } int newRegNo = sc.nextInt(); sc.nextLine(); String newPackageType = sc.nextLine(); System.out.println(findAgencyWithHighestPackagePrice(ta)); TravelAgencies obj = agencyDetailsforGivenIdAndType(ta,newRegNo,newPackageType); System.out.println(obj.getAgencyName()+" "+obj.getPrice()); } static TravelAgencies agencyDetailsforGivenIdAndType(TravelAgencies[] ta,int newRegNo,String newPackageType){ for (int i = 0; i< ta.length; i++) { if(ta[i].isFlightFacility() == true){ if(ta[i].getRegNo() == newRegNo && ta[i].getPackageType().equalsIgnoreCase(newPackageType)){ return ta[i]; } } } return null; } static int findAgencyWithHighestPackagePrice(TravelAgencies[] ta){ int max = ta[0].getPrice(); for(int i = 0; i< ta.length; i++) { if(ta[i].getPrice() > max){ max = ta[i].getPrice(); } } return max; } } class TravelAgencies { private int regNo; private String agencyName; private String packageType; private int price; private boolean flightFacility; public int getRegNo(){ return regNo; } public void setRegNo(int regNo){ this.regNo = regNo; } public String getAgencyName(){ return agencyName; } public void setAgencyName(String agencyName) { this.agencyName = agencyName; } public String getPackageType() { return packageType; } public void setPackageType(String packageType) { this.packageType = packageType; } public int getPrice(){ return price; } public void setPrice(int price){ this.price = price; } public boolean isFlightFacility(){ return flightFacility; } public void setFlightFacility(boolean flightFacility) { this.flightFacility = flightFacility; } public TravelAgencies(int regNo, String agencyName, String packageType, int price, boolean flightFacility) { super(); this.regNo = regNo; this.agencyName = agencyName; this.packageType = packageType; this.price = price; this.flightFacility = flightFacility; } } /* 4 123 A2Z Agency Platinum 50000 true 345 SSS Agency Gold 30000 false 987 Cox and Kings Diamond 40000 true 888 Global Tours Silver 20000 false 987 */ please help me to find out where is the error I don't understand in which I can do mistake!! reply as soon as possible..
@srikantapramanik3689
@srikantapramanik3689 2 ай бұрын
Even if after 3 attempts if IPA is not clear then there will be any chance to revoke an offer letter and not get the joining letter?? 😢 Plz clear it sir 🙏, I'm so worried 😢
@thetechyguy18
@thetechyguy18 2 ай бұрын
No, OL or JL will not be revoked. Chill!
@prathameshamundkar4549
@prathameshamundkar4549 2 ай бұрын
What is the syllabus of PRA for 24
@thetechyguy18
@thetechyguy18 2 ай бұрын
U will get to know in IPA
@ridhigarg8613
@ridhigarg8613 2 ай бұрын
hey my sample test cases are passing, but internal cases are failing
@thetechyguy18
@thetechyguy18 2 ай бұрын
Paste ur code in chatgpt and ask for edge cases may be code not handling that
@IshaAdhikari-o7v
@IshaAdhikari-o7v 2 ай бұрын
hey buddy, i find some error in the logic static int hotelByHighestRating(Hotel[] arr, String cabFaci){ for (int i = 0; i < arr.length; i++) { if(arr[i].getHotelCabfacility().equalsIgnoreCase(cabFaci) && arr[i].getHotelRating()>5){ return arr[i].getHotelRating(); } } return 0; } } here you have print the rating which is greater than 5 and also the cabFacility is CabFaci but it only print the element which encounters first encounters and satisfy the condition but it won't return the highest one. Suppose we have an example 101 Taj YES 6 70000 102 ITC YES 7 According to the question it should print 7 as rating but with your logic it print 6 as an output
@thetechyguy18
@thetechyguy18 2 ай бұрын
Agreed!, We can use max here to compare the previous and current max
@yashgupta5705
@yashgupta5705 3 ай бұрын
Sir can you share this notepad file plz sir
@thetechyguy18
@thetechyguy18 3 ай бұрын
I don't bro where I placed
@ascesadellindia2349
@ascesadellindia2349 3 ай бұрын
why n=n/10; ?
@thetechyguy18
@thetechyguy18 3 ай бұрын
So that we can update the value of n after taking the remainder ex. N = 154 Rem = 4 Now N = 15 after the operation I commented
@atchaya6447
@atchaya6447 3 ай бұрын
where to study unix?
@thetechyguy18
@thetechyguy18 3 ай бұрын
On ur own or take reference from blog
@mohammedriyas9814
@mohammedriyas9814 4 ай бұрын
Bro i tried now but i have nullExceptionpointer error, what should I do
@thetechyguy18
@thetechyguy18 4 ай бұрын
Paste ur code in chatgpt using prompt what is wrong with my code
@Legend-gx6je
@Legend-gx6je 4 ай бұрын
Do not overuse right right right.... 😂
@thetechyguy18
@thetechyguy18 4 ай бұрын
Right, I will remember next time 😉
@anuragagarwal3639
@anuragagarwal3639 5 ай бұрын
I completed it in java and only 6/7 test csses passed..which test case couldnt pass with the same logic
@thetechyguy18
@thetechyguy18 5 ай бұрын
Read questions carefully sometimes in excitement we forgot some texts
@sirichandanapinky
@sirichandanapinky 5 ай бұрын
Bro you won't believe me I just saw that most asked IPA kyt,bizskills questions pdf of yours I could blindly click options in like 1 minute everything is from these almost
@thetechyguy18
@thetechyguy18 5 ай бұрын
Great hope u will get 80+
@sandykar8714
@sandykar8714 Ай бұрын
Can you please help me out from where you got the pdf ?
@sirichandanapinky
@sirichandanapinky 5 ай бұрын
Bro your videos are the best!!!!!! Today I wrote IPA and they asked similar question but for atleast 3 odd numbers "TRUE" else "FALSE"
@thetechyguy18
@thetechyguy18 5 ай бұрын
Good to hear 😊
@Manish_Malik5
@Manish_Malik5 5 ай бұрын
Bhai getter setter lga leta bhai
@thetechyguy18
@thetechyguy18 5 ай бұрын
Lgaya toh hain bro
@sirichandanapinky
@sirichandanapinky 5 ай бұрын
will ipa questions be of strings ansd oops only?
@thetechyguy18
@thetechyguy18 5 ай бұрын
Arrays list string majorly
@Ankitkumar-gc5cc
@Ankitkumar-gc5cc 5 ай бұрын
1:33 answer is 3
@thetechyguy18
@thetechyguy18 5 ай бұрын
okay thankyou
@VarshithaYS-r2h
@VarshithaYS-r2h Ай бұрын
@@thetechyguy18 how unicode should start with \u this ryt?
@ajaydasari930
@ajaydasari930 Ай бұрын
Bro did these video helped u in ipa exam
@PawankumarTummawar-1
@PawankumarTummawar-1 Ай бұрын
I think the answer for that question is ---> None of these because in option 3 it must be enclosed in single quotes '....' and also starting u should be lowercase