hello falguni ,
you should implement in your program and see trying the both methods. You can read examples online to see which method is used more.