10. SoftUni Course Planning- 66/100
Ако някой има време и желание, моля да погледне кода ми, ще бъда благодарна, тъй като за жалост на упражнението, което гледах се отказаха да дебъгват докрай за да открият защо се получава несъответствие в аутпутите. Аз дебъгвах няколко часа, но така и не успях да остраня проблемите, които забелязвам:
-при "Swap" командата: понякога се преместват и упражненията, а понякога се пропускат;
-проблем при изпечатването, ако имаме примерно "Data Types", защото очевидно не чета правилно входната команда, ако тя се състой от две думи;
-мисля, че отстраних проблема при командата "Exercise" и сега работи както трябва;
-предпоследният тест е RunTime error и с мойте тестове не мога да разбера къде бих могла да изляза от границите на масива;
И все пак ако има по-кратко и логично решение бих се радвала поне да знам, че същестува, дори и ако все още е част от материала, който не съм учила.
условие: https://softuni.bg/trainings/resources/officedocument/49579/lists-exercise-csharp-fundamentals-may-2020/2830
https://judge.softuni.bg/Contests/Compete/Index/1211#9
https://pastebin.com/Wq3ihC9F 66/100
Hi,
thanks to both of you!
I've handled your solutions and was debuging until 3 a.m. Unfortunately for this exercise I have up 10 hours debuging.
I've refactored my code and now I think everything is working without print. Can somebody please have a look at my "Console.WriteLine()", only this, not the rest of the lines.
https://pastebin.com/gJydF5Ud
All the best!
Eli
From what I can see, the code seems to be working, only the final-output is not working as it should, but this is caused by the way you are splitting up the initial input string at line 11 (Monodevelop). When used with List<string> scheduleList = Console.ReadLine().Split(", ").ToList(); instead of List<string> scheduleList = Console.ReadLine().Split(", ".ToCharArray()).ToList();, then the input comes out just fine.
Best,
Output with Monodevelop:
1.Arrays
2.Data
3.Types
4.
5.Objects
6.
7.Databases
Expected Output with standard input-split:
1.Arrays
2.Data Types
3.Objects
4.Databases
Thanks again!
It didn't crossed my mind that the root of the problem was MonoDevelop.
For Christmas I plan to buy a new laptop with Windows 10 and maybe same of my problems would be resolved. :)
https://pastebin.com/pYQTesny - 88/100 with Test #9 (Time limit), but I'am confident the logic is corect and the code works.
By the way I have watched the webinar with Iordan Georgeiv. It's very useful about habits and how brain works, thanks a lot. While I was studying six years at the university I did my best to develop and learn helthy habits about discipline and studing. I familiar with the book "Eat the frog" and how important is to do hardest things first in the morning. For this I'am studying in the morning and going to work after 3 o'clock. I love to recomend you "The Willpower Instinct: How Self-Control Works, Why It Matters, and What You Can Do to Get More of It " and "The Psychology of Performance: How to Be Your Best in Life".
Best regards!
Eli
Thanks for the recommendations.
Just be aware that the workload in C#OOP/Advanced is double the amount of C#-Fundamentals and that a greater amount of functionality built into Visual Studio is used during that course (especially Unit-Tests). So using Monodevelop might be a potential risk.
Time-limit tests usually disappear if you validate the code again in the judge-system, so you can try that out.
All the best,