Solar type II radio bursts are interpreted as the radio signature of shock waves travelling through the solar corona. Some of these shock waves are able to enter into the interplanetary medium and are observed as interplanetary type II bursts. The nonthermal radio emission of these bursts indicates that electrons are accelerated up to superthermal and/or relativistic velocities at the corresponding shocks. Plasma waves measurements at interplanetary shock waves provide the assumption that the fundamental type II radio emission is generated by wave-wave interactions of electron plasma waves and ion acoustic waves and that the source region is located near the transition region of the shock. Therefore, the instantaneous bandwidth of type II bursts should reflect the density jump across the shock. Comparing the theoretically predicted density jump of coronal shock waves (Rankine-Hugoniot relations) and the measured instantaneous bandwidth of solar type II radio bursts it is appropriate to assume that these bursts are generated by weak supercritical quasi-parallel shock waves. Two different mechanisms for the accelaration of electrons at this kind of shock waves are investigated in form of test particle calculations in given magnetic and electric fields. These fields have been extracted from in-situ measurements at the quasi-parallel region at Earth's bow shock, which showed large amplitude magnetic field fluctuations (so-called SLAMS: Short Large Amplitude Magnetic Field Structures) as constituent parts. The first mechanism treats these structures as strong magnetic mirrors, at which charged particles are reflected and accelerated. Thus, thermal electrons gain energy due to multiple reflections between two approaching SLAMS. The second mechanism shows that it is possible to accelerate electrons inside a single SLAMS due to a non-coplanar component of the magnetic field in these structures. Both mechanism are described in form of test particle calculations, which are supplemented by calculations according to adiabatic theory. The results are discussed for circumstances in the solar corona and in interplanetary space.