Hey guys! I just had a quick question. I'm assuming I would use recursion for this, but the method I have come up with in my head seems much too tedious and ridiculous to implement. I want to do a Connection Tree kind of like FaceBook's... You know where it says "Jeff is connected to Caleb through Jeff::John:😃ave::Lindsay::Caleb".
That kind of thing. It seems like for every User_id, I'd have to search through the rest of the user ids and find if that person is a friend, otherwise move to the next, all the way down the line, and then if nobody is found move on to connection 2, and repeat the process, then move to 3, it seems so unoptimized. Do you guys have any code that could give me some help?
Thanks!