Anonymous
Just trying to learn the language!
Anonymous
Can u send me the code?
Wait, you don't need dynamic programming here. Declare a 2D array like: 816 357 492 Since the sum of each row, column, diagonal turns out zero, the first one wins anyways
Box of
Closest thing that comes to my mind is preprocessor and #define N 1
Anonymous
Closest thing that comes to my mind is preprocessor and #define N 1
What if I access an out of bound location of array
Box of
My example isn't array
Box of
You're declaring N to have value of 1
Box of
Each time you type in your code N it will be seen as 1
Anonymous
Gotcha
Anonymous
I meant to ask it as a separate question
Anonymous
any one have idea about stl in c++ please suggest me
Anonymous
any one have idea about stl in c++ please suggest me
Yeah sure, what do you want to know?
Box of
What if I access an out of bound location of array
Maybe segmentation fault, maybe some other garbage
Anonymous
Mihail
if you don't have access to it seg fault i think
Mihail
not sure tho
Anonymous
@Talhapower ot exists for a reason
Anmol
plzz explain recrsion
Anmol
in c
BinaryByter
plzz explain recrsion
it is when a function calls itself
BinaryByter
void my_recursion () { my_recursion(); }
BinaryByter
this will happen infinitely
BinaryByter
until the stack is full
BinaryByter
then it will stackoverflow
Anmol
it is when a function calls itself
But clear not mind understood not
Anmol
what?
In practical can't clear rucrusion
BinaryByter
for example, think about fibonacci
BinaryByter
you can implement it like this:
BinaryByter
int fibonacci (int degree) { return fibonacci (degree -1) + fibonacci (degree - 2); }
Anmol
I am not understood any video for example so provide me and in group any Indian men??
BinaryByter
there are too many indian men here
Mihail
int fibonacci (int degree) { return fibonacci (degree -1) + fibonacci (degree - 2); }
#include <iostream> void recursion () { std::cout « "Hi, I'm recursion" « endl; recursion(); }
Mihail
wrong reply
Mihail
oops
BinaryByter
yea, @Hackeranu (change your name please, btw), try that
Mihail
do you understand?
Anmol
Sorry i am beginner so i am not understood
BinaryByter
do you know what a function is ?
BinaryByter
do you know how to call a function?
BinaryByter
I know that you know that but i'M not suer wether he does
Dima
boner.deb
Dima
let’s make some fun ( ͡° ͜ʖ ͡°)
Anonymous
Yeah sure, what do you want to know?
I have not good concept of STL so , I want to learn STL
BinaryByter
I have not good concept of STL so , I want to learn STL
It's the standard template library
Roxifλsz 🇱🇹
boner.deb
>not boner.rpm I'll have you know, fedora is best *tips distro*
Anonymous
It's the standard template library
yes , do you know good source to learn STL ? if you know then please provide link
olli
int fibonacci (int degree) { return fibonacci (degree -1) + fibonacci (degree - 2); }
How to write Fibonacci https://youtube.com/watch?v=QIHy8pXbneI&t=35m31s (great talk)
Roxifλsz 🇱🇹
yes , do you know good source to learn STL ? if you know then please provide link
At first you should make sure you know what templates actually are, if you know that you can simply use google to find tutorials on what the STL is about, also for algorithms in the STL this cppcon talk is pretty fun and informative imo https://youtu.be/2olsGf6JIkU
Anonymous
How to find the median on an array in c++
Anonymous
sry for spam @admin it won’t happen again, I promise. My twitter got blocked and I paniced, once access is restored I’ll tweet about your group and link back to you and a short article about the your group on Medium. Also I’m searching for anyone who’d like to work on some improvements on Bettergram with me since theres a tagging feature I’d like to implement, proposal is available on Trello, I don’t know any C++ yet so any help would be appreciated. Thank you very much for still having me in your group!
Anonymous
Plzz fast
Anonymous
?
Anonymous
Talha: How to find the median on an array in c++
Anonymous
I don’t know, failed statistcs
Anonymous
😥
olli
How to find the median on an array in c++
sort it, take the middle element. (introselect works as well)
Anonymous
No
Anonymous
Fast
olli
then use std::nth_element
Anonymous
tx
Anonymous
Very fast working ❤️
olli
as fast as it gets
Anonymous
Yez
Anonymous
Can u tell me the logic to find median also
olli
https://en.wikipedia.org/wiki/Introselect is probably used by std::nth_element
Anonymous
Txx
Anonymous
U best
Anonymous
❤️
Mubeen
Deep
Hello guys , I am writing a book on c and c++ . Anybody who wish to help me can connect with me personally.
Deep
It's cost free ...