@@ -25,7 +25,7 @@ def __init__(self):
2525 self .caps = defaultdict (list )
2626
2727 # Mask is the set of persons, i is the current cap number.
28- def countWaysUtil (self , dp , mask , cap_no ):
28+ def count_ways_util (self , dp , mask , cap_no ):
2929
3030 # If all persons are wearing a cap so we
3131 # are done and this is one way so return 1
@@ -43,7 +43,7 @@ def countWaysUtil(self, dp, mask, cap_no):
4343
4444 # Ways, when we don't include this cap in our arrangement
4545 # or solution set
46- ways = self .countWaysUtil (dp , mask , cap_no + 1 )
46+ ways = self .count_ways_util (dp , mask , cap_no + 1 )
4747
4848 # assign ith cap one by one to all the possible persons
4949 # and recur for remaining caps.
@@ -57,7 +57,7 @@ def countWaysUtil(self, dp, mask, cap_no):
5757
5858 # Else assign him this cap and recur for remaining caps with
5959 # new updated mask vector
60- ways += self .countWaysUtil (dp , mask | (1 << ppl ), cap_no + 1 )
60+ ways += self .count_ways_util (dp , mask | (1 << ppl ), cap_no + 1 )
6161
6262 ways = ways % (10 ** 9 + 7 )
6363
@@ -66,7 +66,7 @@ def countWaysUtil(self, dp, mask, cap_no):
6666
6767 return dp [mask ][cap_no ]
6868
69- def countWays (self , N ):
69+ def count_ways (self , N ):
7070
7171 # Reads n lines from standard input for current test case
7272 # create dictionary for cap. cap[i] = list of person having
@@ -88,12 +88,12 @@ def countWays(self, N):
8888
8989 # Call recursive function countWaysUtil
9090 # result will be in dp[0][1]
91- print (self .countWaysUtil (dp , 0 , 1 ,))
91+ print (self .count_ways_util (dp , 0 , 1 ,))
9292
9393# Driver Program
9494
9595
9696def main ():
9797 No_of_people = int (input ()) # number of persons in every test case
9898
99- AssignCap ().countWays (No_of_people )
99+ AssignCap ().count_ways (No_of_people )
0 commit comments