What do you think that in С++ templates you can write class or typename, and the difference will be only for a person?
Anonymous Poll
17%
useful (code more readable)
33%
useless (not obviously and two ways to do the same)
8%
neutral (historical reason...)
42%
I'm a Batman
I went to interview to CS Center. The interview consists of two parts, 30 minutes each.
In the first part they give you 3 problems. I had folllowing problems:
1) How many ways to make a tower of height N from red and blue cubes so that not a single red would stand on red.
I didn't have time to solve this problem at the interview, but solved it later. In the comments I will give a hint and then a solution
2) Write code that finds an element in an array that occurs in more than half of the positions. Time: O(n) Memory: O(1)
I solved it, the solution will be in the comments
3) A boring task with equations and graphs, I solved it
In the second part you tell about your motivation, how good you are, and how much free time you have
I hope I will pass (but don't believe it)
In the first part they give you 3 problems. I had folllowing problems:
1) How many ways to make a tower of height N from red and blue cubes so that not a single red would stand on red.
I didn't have time to solve this problem at the interview, but solved it later. In the comments I will give a hint and then a solution
2) Write code that finds an element in an array that occurs in more than half of the positions. Time: O(n) Memory: O(1)
I solved it, the solution will be in the comments
3) A boring task with equations and graphs, I solved it
In the second part you tell about your motivation, how good you are, and how much free time you have
I hope I will pass (but don't believe it)
By the way, yesterday (tonight) I wrote a bot for Discord, which doesn't use the bot API, and I'm surprised at how indifferent Discord is to data security.
In general, this year I read 3 python books, perhaps these are the only books that I can recommend on it somehow:
1) Cookbook by David Beazley is very cool book, I like the format in it: different features of the language, and even what you know is revealed in an unexpected example, the only drawback is that it is 2013, and for example there is no async
2) I also read Fluent Python, this is a classic book on python for non-beginners, I can't say that I really liked it, but it’s good and the only one of the “general” python books that I can recommend.
3) Python Tricks is an easy-to-read book that has interesting examples, but it’s not big and fairly simple, and as a result I learned a little from it.
#python #book
1) Cookbook by David Beazley is very cool book, I like the format in it: different features of the language, and even what you know is revealed in an unexpected example, the only drawback is that it is 2013, and for example there is no async
2) I also read Fluent Python, this is a classic book on python for non-beginners, I can't say that I really liked it, but it’s good and the only one of the “general” python books that I can recommend.
3) Python Tricks is an easy-to-read book that has interesting examples, but it’s not big and fairly simple, and as a result I learned a little from it.
#python #book
I will write about the internship in the evening, otherwise I constantly postpone this
I'm writing a review about my internship just now, after 3 weeks of work, because I'm lazy chmony. If anyone doesn't know, my internship is in the C++ backend team in Wartsila Transas.
I'm starting with minuses:
1) The office is a little poor on my floor
2) No free food except fruits/cookies. On the other hand, it can be a plus, because I wouldn't really want to eat in the canteen
3) The road to work takes 1 hour to one side
But there are a lot of pluses, such as:
1) Tasks are interesting, for example, I invented a new config backup and track label generalization algorithms, but, of course, there are a bit boring tasks too
2) A rather flexible schedule, I'm not afraid to oversleep) And I can always skip a day and work on a day off, I try not to do it because there are few other people on a day off
3) Colleagues are smart and helpful, they write useful comments on my pull requests) They are always ready to answer the questions I ask.
4) Salary is good for intern;)
5) The working computer is cool and workplaces are quite far apart
6) I also like the workplace, it isn't boring, nor too intensive
At first, I was feeling dumb because of the fact that I read the task and had no idea how to start. There is also a lot of code that I don’t understand, but everything works out for itself)
I'm starting with minuses:
1) The office is a little poor on my floor
2) No free food except fruits/cookies. On the other hand, it can be a plus, because I wouldn't really want to eat in the canteen
3) The road to work takes 1 hour to one side
But there are a lot of pluses, such as:
1) Tasks are interesting, for example, I invented a new config backup and track label generalization algorithms, but, of course, there are a bit boring tasks too
2) A rather flexible schedule, I'm not afraid to oversleep) And I can always skip a day and work on a day off, I try not to do it because there are few other people on a day off
3) Colleagues are smart and helpful, they write useful comments on my pull requests) They are always ready to answer the questions I ask.
4) Salary is good for intern;)
5) The working computer is cool and workplaces are quite far apart
6) I also like the workplace, it isn't boring, nor too intensive
At first, I was feeling dumb because of the fact that I read the task and had no idea how to start. There is also a lot of code that I don’t understand, but everything works out for itself)
I finally tidied up the repository https://github.com/MBkkt/TransportCatalog. By the way, there are more than few thousands lines of code, to be honest, I was a little surprised. So I’m waiting for the stars(In fact, for me it’s not so important, I just want it to look more confident in my resume)
GitHub
GitHub - MBkkt/TransportCatalog: Intelligent database for transport
Intelligent database for transport. Contribute to MBkkt/TransportCatalog development by creating an account on GitHub.
Hi, nothing new happened in a month, except that I understood that working 60-80 hours a week is difficult.
I also wrote a contest from the CSC, the tasks were mostly not very difficult, although with some I was dumb.
Now I’m thinking what courses besides algorithms to take. Most likely databases, computer architecture, possibly java
I also wrote a contest from the CSC, the tasks were mostly not very difficult, although with some I was dumb.
Now I’m thinking what courses besides algorithms to take. Most likely databases, computer architecture, possibly java
Hi, I brought you articles to read:
1) https://habr.com/en/post/111602, I have a lot of classes at my job using this idiom. I wouldn't say that it is always cool, but generally usable, though we have a more tricky memory allocation mechanism, the general to the entire application, it also allows to run partial assemblies application without recompilation
2) I read about the exceptions (don't be lazy to read one of the links at the beginning of the article, its cool too) https://habr.com/en/post/279111
1) https://habr.com/en/post/111602, I have a lot of classes at my job using this idiom. I wouldn't say that it is always cool, but generally usable, though we have a more tricky memory allocation mechanism, the general to the entire application, it also allows to run partial assemblies application without recompilation
2) I read about the exceptions (don't be lazy to read one of the links at the beginning of the article, its cool too) https://habr.com/en/post/279111