Help me with approach

Given the total number of persons n and a number k which indicates that k-1 persons are skipped and kth person is killed in circle in a fixed direction.​
The task is to choose the safe place in the circle so that when you perform these operations starting from 1st place in the circle, you are the last one remaining and survive.

with following recursive structure
josephus(n, k) = (josephus(n - 1, k) + k-1) % n + 1
josephus(1, k) = 1

@affanahmed See in N queen problem we make a box true if it is safe to place queen there and then make a recursive call and if we are able to place all the n queens on the chess board by fixing one queen at this particular box then our function returns 1 as it is one way to place all the n queens now since our task is to find all the ways or orientations in which we can place n queens on a given chessboard we have to take out queen from this particular box which we had previously marked true so for this we marked this box false and thus checks for other orientations possible.