Тёмный
CodeWithPassion
CodeWithPassion
CodeWithPassion
Подписаться
Комментарии
@Sainmabook
@Sainmabook 2 дня назад
thank you
@kalyanich9964
@kalyanich9964 2 месяца назад
Thanks for this video
@codewithpassion67
@codewithpassion67 2 месяца назад
Most welcome
@kalyanich9964
@kalyanich9964 2 месяца назад
Nice information
@kalyanich9964
@kalyanich9964 2 месяца назад
Nice information
@codewithpassion67
@codewithpassion67 2 месяца назад
Thanks
@shekarvlogs8016
@shekarvlogs8016 2 месяца назад
Bro colour grading classes cheppava
@codewithpassion67
@codewithpassion67 2 месяца назад
@@shekarvlogs8016 sure bro..
@MaheshMahi-lb1zf
@MaheshMahi-lb1zf 2 месяца назад
Expecting more interesting concepts from you broo very valuable content providing to us
@codewithpassion67
@codewithpassion67 2 месяца назад
Thank you! Mahesh, I'm glad to hear you're finding the content valuable. If you have any specific topics or concepts you'd like to explore, feel free to let me know!
@MaheshMahi-lb1zf
@MaheshMahi-lb1zf 2 месяца назад
@@codewithpassion67 👍👍
@MaheshMahi-lb1zf
@MaheshMahi-lb1zf 2 месяца назад
@@codewithpassion67 currently I'm pursuing my mca second year I exploring more content on cloud computing in real time examples
@Nexatek
@Nexatek 2 месяца назад
I’m the first viewer, cheers 🥂
@codewithpassion67
@codewithpassion67 2 месяца назад
Thank you ❤️
@naveenkumarmaddala7830
@naveenkumarmaddala7830 6 месяцев назад
Hi Aditya, Thanks for the video. I need your help on below coding question Input: {1,1,0,1,1,1,0,2,2,1,1,2,2,1,1,0,0,0,1} Output: Number Run. Count 1 2 3 0 1 2 1 3 1 2 2 2 If we take example as 1 number from the output. Run is nothing but 1 repeated two times in the input and the count corresponds to how many such combinations were present in the input. This question was asked in Trans Union Company. Please let me know if you are not clear on the question. Hint they have given Map of Map. Also they asked which collection would you prefer to store above data? I need sample code on Java 8 or prior Java version is also fine.
@codewithpassion67
@codewithpassion67 6 месяцев назад
Hi Naveen. I just saw your comment. Could you explain the output portion a bit ? Is that output is final output of the problem or else it was just example to explain logic?
@naveenkumarmaddala7830
@naveenkumarmaddala7830 6 месяцев назад
@@codewithpassion67 That is the correct output
@codewithpassion67
@codewithpassion67 6 месяцев назад
Hi Naveen, import java.util.*; public class RunCount { public static void main(String[] args) { int[] input = { 1, 1, 0, 1, 1, 1, 0, 2, 2, 1, 1, 2, 2, 1, 1, 0, 0, 0, 1 }; // Create a Map to store runs and counts for each number Map<String, Map<String, Integer>> result = new LinkedHashMap<>(); // Iterate through the input array String key = ""; for (int i = 0; i < input.length - 1; i++) { key = key + input[i] + ","; if (input[i] != input[i + 1]) { var innerMap = result.getOrDefault(key, new HashMap<>()); if (innerMap.size() > 0) { int count = innerMap.getOrDefault("Count", 0); innerMap.put("Count", ++count); } else { innerMap.put("Run", key.length() / 2); innerMap.put("Count", 1); } result.put(key, innerMap); key = ""; } } // Print the header System.out.println(result); System.out.println("Number\tRun\tCount"); for (var combination : result.entrySet()) { String number = combination.getKey().substring(0, 1); Integer run = 0; Integer count = 0; Map<String, Integer> innerMap = result.get(combination.getKey()); for (var attribute : innerMap.entrySet()) { if (attribute.getKey().equals("Run")) { run = innerMap.get(attribute.getKey()); } else { count = innerMap.get(attribute.getKey()); } } System.out.println("\t" + number + "\t" + run + "\t" + count); } I was able to get the out put as provided in your problem Number Run Count 1 2 3 0 1 2 1 3 1 2 2 2 0 3 1 I was held in other editing work. Let me know this work or we can improve this further. I hope this works as a brute force approach.
@codewithpassion67
@codewithpassion67 6 месяцев назад
Hi Naveen, If the code works for you let me know. If you like my videos, please do subscribe
@Drongo_1
@Drongo_1 6 месяцев назад
Hello! The Asus TUF F15 i7 12700 model I purchased last week has a normal temperature of 40 degrees, but when I enter RU-vid, it goes up to 70 degrees. Is this normal? Have you experienced a similar situation?
@codewithpassion67
@codewithpassion67 6 месяцев назад
Hi @Drongo_1 Nope, when using youtube and watching movies thermals are in 30 - 40 range only. If you are experiencing means you have plugged in and turbo mode is on. Turn off turbo to silent for less heavy tasks like watching movies. Use turbo mode for heavy tasks like gaming and editing. Hope this helps you..
@Drongo_1
@Drongo_1 6 месяцев назад
​​@@codewithpassion67I've been using it in silent mode, but the temperature is reaching these values. I've tried many methods to reduce it, but I think this is not a problem I can solve. Thanks for your reference. I'll probably show this to a computer technician.
@freshedits8408
@freshedits8408 7 месяцев назад
Very nice
@codewithpassion67
@codewithpassion67 6 месяцев назад
Thank you ❤️ Please do subscribe.
@random-user-1337
@random-user-1337 7 месяцев назад
Thanks.
@codewithpassion67
@codewithpassion67 7 месяцев назад
Your welcome ❤️ Please do subscribe
@mugundh.a
@mugundh.a 7 месяцев назад
Bro model,when comes under 1lakh
@codewithpassion67
@codewithpassion67 7 месяцев назад
Hi bro, I bought during the flipkart republic day sales time. I got it for 93k using card offers. Better wait for some sale time and buy. i7 12 th gen, 4060 RTX, 16 GB RAM and 512 GB SSB
@muggaming920
@muggaming920 7 месяцев назад
Hey bro i am plaing to buy this broo whats your thoughts
@codewithpassion67
@codewithpassion67 7 месяцев назад
Hi bro For what purpose your are planning to buy ? It was decent one. I have played games like GTA, Spiderman, horizon. No issues as of now. Only one issue is the fan sound in turbo mode. I can see thermals also increased but, performance wise it good to go, if your under 90k - 1 lakh budget go for it.