We first present a nonuniform box search algorithm with length of each side of the square box dependent on the local smoothing length, and show that it can save up to 70% CPU time as compared to the uniform box search algorithm. This is especially relevant for transient problems in which, if we enlarge the sides of boxes, we can apply the search algorithm fewer times during the solution process, and improve the computational efficiency of a numerical scheme. We illustrate the application of the search algorithm and the modified smoothed particle hydrodynamics (MSPH) method by studying the propagation of cracks in elastostatic and elastodynamic problems. The dynamic stress intensity factor computed with the MSPH method either from the stress field near the crack tip or from the J-integral agrees very well with that computed by using the finite element method. Three problems are analyzed. One of these involves a plate with a centrally located crack, and the other with three cracks on plates's horizontal centroidal axis. In each case the plate edges parallel to the crack are loaded in a direction perpendicular to the crack surface. It is found that, at low strain rates, the presence of other cracks will delay the propagation of the central crack. However, at high strain rates, the speed of propagation of the central crack is unaffected by the presence of the other two cracks. In the third problem dealing with the simulation of crack propagation in a functionally graded plate, the crack speed is found to be close to the experimental one.