Pavel
in this case it's not a function, but it has the same behavior
cout.operator<<(c+1).operator<<(" ").operator<<(c++).operator<<(endl);
Pavel
And as a funny fact, such an error even was found in a Stroustrup's book, but in his case, as the strings have the same length, the result is the same, but if you change it...
https://stackoverflow.com/questions/27158812/does-this-code-from-the-c-programming-language-4th-edition-section-36-3-6-ha
Pavel
Then C++17 fixed that
Dima
Z0OM
How much time will it take to jump from c++98 to c++17?
Giri
GammaXY
What is the meaning of linear time and constant additional space?
01000001011011010100000101101110
01000001011011010100000101101110
Moore's voting algorithm
GammaXY
Ohh ok
01000001011011010100000101101110
Giri
Tobias🐾🚲
Also his answer isnt complete, as the initial answer wants it for ANY occurence, not just a single item.
Giri
Giri
Giri
It's actually correctly giving the output ...But timecomplexity is high.O(n^2)
Tobias🐾🚲
That... i dont think that comes even close.
Giri
Tobias🐾🚲
Its not remotely constant space, as you spawn a new search for each element across the entire array (stack usage is also counted, so are array elements). Nor is it O(n) nor an approximation. :P
01000001011011010100000101101110
https://www.geeksforgeeks.org/n3-repeated-number-array-o1-space/
Giri
Giri
Whats is your openion for this correct or incorrect? Tell AmAn
01000001011011010100000101101110
what do you mean?
Giri
Tobias🐾🚲
You could've googled one second.
Tobias🐾🚲
That you even list python shows you didnt look at any results:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html
01000001011011010100000101101110
Tobias🐾🚲
And its not pure speed that matters. You also have to take into account:
how fast you can develop.
Is it sufficiently fast for your needs (users/requests per second/scalable)
etc.
Tobias🐾🚲
You can make the slowest experimental language program ever, and it could still be enough if its a single user accessing research data to put into something and patient enough to wait for 5 minutes.
Tobias🐾🚲
That obviously won't work for google and co of course.
01000001011011010100000101101110
Giri
First learn your self and after that you have to say others..🥴🥴
Tobias🐾🚲
Its too late - you already showed being too lazy to even google. :P
Tobias🐾🚲
Tobias🐾🚲
Kelvin
inb4ban
Tobias🐾🚲
And you took so little time to research that you listed basically three random languages.
Tobias🐾🚲
"Best language" comes down to:
time constraints
performance constraints
monetary constraints
useable frameworks that may line up with what you want to do
etc etc etc.
Giri
Tobias🐾🚲
A language is never "the best"
It comes down to "how much do you know in it, how fast must the project be ready, how much someone is willing to spend on it, and what must it deliver".
Tobias🐾🚲
🤫🤫
Trust me, you're not making it better by trying to offload it. You've been lazy in researching. :P
Giri
Z0OM
Hmmm
Anonymous
Hello everyone
klimi
hi
Alpha
Hello
Mar!o
Hey
Anonymous
Gooday all am new here 🌹
Mar!o
Welcome!!
Anonymous
Thanks bro
Mar!o
:)
Khaleed
class HelloWorld { public: void PrintHelloWorld() { std::cout << "Hello World!\n"; } };
Anonymous
Guys am new to c++ please how can I meet up??
Mar!o
Just post your questions or coding problems here
Anonymous
Khaleed
https://news.efinancialcareers.com/uk-en/3002761/coding-languages-for-a-job-at-google
Anonymous
Mar!o
Anonymous
Holla!!
Dima
Lol
Alpha
how can i read from a file into an array of structs?
Mar!o
What is the files format? JSON, XML, YAML? Or binary? Or just printed numbers?
Sandy #КИБЕРИНЖЕКТОРЫ
Alpha
file format is .txt
Alpha
Fri 13/07 18.00 VB - HOB 3 - 1 4168
that is one example, there's 100+ lines in the text
this is my struct
struct matchHistory {
char day[3];
int date;
double time;
char teams;
int score;
int spectators;
};
Григорий
Google how to work with <fstream> to read from file.
Anonymous
👍
Francisco
/report