Patients receive methotrexate and cytarabine intrathecally on days 1, 4, 11, and 36 (on day 40 for patients with stage IV NHL or B-ALL only) in combination with alternating courses of: A) cyclophosphamide IV every 12 hours for a total of six doses on days 1-3, doxorubicin IV over 30 minutes on day 4, vincristine IV on days 4 and 11, dexamethasone IV or orally twice daily on days 1-5, and filgrastim (G-CSF) subcutaneously (SQ) or IV over 30 minutes beginning on day 5 and continuing until blood counts recover and B) methotrexate IV over 24 hours on day 18, methotrexate intrathecally on day 18, dexamethasone IV or orally twice daily on days 18-22, leucovorin calcium IV or orally every 6 hours for a total of 6 doses on days 20-21, cytarabine IV over 48 hours on days 20-21, and G-CSF SQ or IV over 30 minutes beginning on day 22 and continuing until blood counts recover. Patients with stage III NHL receive at total of 5 courses of treatment (A-B-A-B-A) and patients with stage IV NHL or B-ALL with no CNS involvement receive a total of 6 courses of treatment (A-B-A-B-A-B).