Category : algorithm

I am currently working on a project where the days of the week are stored as numbers in a sql database. 1=monday,2=tuesday,3=wednesday,4=thursday,5=friday,6=saturday and 7=sunday. So for example number 1234 in the database represents monday, tuesday, wednesday ,thursday. We are using this number string and converting it to days in our frontend and rendering it on ..

Read more

I need to order a graph appropriately, considering the levels. Assuming I have this data: const people = [ { ‘name’: ‘john’, ‘level’: 0, ‘connections’: [‘monica’, ‘jeffrey’] }, { ‘name’: ‘monica’, ‘level’: 1, ‘connections’: [‘william’] }, { ‘name’: ‘jeffrey’, ‘level’: 1, ‘connections’: [‘george’] }, { ‘name’: ‘george’, ‘level’: 1, ‘connections’: [] }, { ‘name’: ‘william’, ..

Read more