Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Jack Campbell
Jack Campbell
1,822 Points

IOS survey question

Hi guys,

I am trying to make an app where there is a survey that asks 25 questions and then with those 25 questions the app gives back a letter or a code. I just briefly looked into this: https://admin.polljoy.com/integrate but I am not sure if it will be able to help me in the way I need it to. The idea is sort of like match.com for example. I want to connect people that get similar results on the survey. If you can kind of see where I am going and you think you know how to do something like this please let me know.

Thanks so much!

Brandon Mowat
Brandon Mowat
8,186 Points

I think I know kind of what you mean. It sounds link you're going to need to build an ADT (Abstract Data Type) like a tree.

As your users answer questions, they will traverse the tree and end up at a "leaf".

Then from there you can match users at that leaf.

That's just a very simple way of matching users. There's a variety of ways you could go about doing it but that is just a simple way.

More on tree's (specifically heaps) https://en.wikipedia.org/wiki/Heap_(data_structure)

also maybe look up "Binary Search Trees"

2 Answers

Brandon Mowat
Brandon Mowat
8,186 Points

I think I know kind of what you mean. It sounds link you're going to need to build an ADT (Abstract Data Type) like a tree.

As your users answer questions, they will traverse the tree and end up at a "leaf".

Then from there you can match users at that leaf.

That's just a very simple way of matching users. There's a variety of ways you could go about doing it but that is just a simple way.

More on tree's (specifically heaps) https://en.wikipedia.org/wiki/Heap_(data_structure)

also maybe look up "Binary Search Trees"