Error in this code
hello @vector.9974
increasing ur str array size.
check constraint and decide size accorsdingly.
also
![]()
dont calculate n from this(it will always give same result)
use k as size.
sir, i updated the code, yet it isnt working
@vector.9974
size of str should be 10 factorial .
pass k by refrence to avoid copy
pls check ur updated code here->
sir, how does making the string array global allow to make its size larger as earlier i tried this on my local system. it did compile, however there was a segmentation fault shown
if you declare the array inside a function
here you are declaring array inside main()
so you can only make array of size 10^6
for larger size array declare it globally
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.