本文介绍了房间分配算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我需要一种算法来向人们分配房间.我需要重新整理房间列表以将房间分配给一个人,并且在将第四个人分配给房间后,它应该不在列表中(应该不可用).我还没有用PHP改组和排序功能的运气.
任何帮助(指针,引用等)将不胜感激.

Hi, I need help with an algorithm to allocate rooms to people. I need to shuffle through a list of rooms to assign a room to a person and after the fourth person is assigned to the room, it should be out of the list(should be unavailable). I have not had any luck with PHP shuffling and sorting functions yet.
Any help (pointers, references, etc.) will greatly be appreciated.

推荐答案


这篇关于房间分配算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 21:58