Practice Similar Problems
Coding PracticeSharpen your skills with handpicked problems that match your weak areas — Arrays, Hashing, and Sliding Window.
Open Coding Practice
| 1 | # QuickSort — Submitted Solution |
| 2 | def quicksort(arr): |
| 3 | # Base case: arrays of length 0 or 1 are sorted |
| 4 | if len(arr) <= 1: |
| 5 | return arr |
| 6 | |
| 7 | pivot = arr[len(arr) // 2] |
| 8 | left = [x for x in arr if x < pivot] |
| 9 | mid = [x for x in arr if x == pivot] |
| 10 | right = [x for x in arr if x > pivot] |
| 11 | |
| 12 | return quicksort(left) + mid + quicksort(right) |
| 13 | |
| 14 | # Test cases |
| 15 | arr = [3, 6, 8, 10, 1, 2, 1] |
| 16 | print(quicksort(arr)) |
How does deep-tutor retrieve and cite answers from multiple uploaded documents?
The deep-tutor platform implements a multi-stage Retrieval-Augmented Generation pipeline that indexes uploaded documents into WeaviateDB using both BM25 keyword scoring and dense vector embeddings, enabling hybrid search retrieval[1]. When a user submits a query, the system classifies intent and routes it through LiteLLM to the most appropriate language model — typically GPT-5 for user-friendly explanations or Claude 4.5 Opus for academic and technical depth[2]. The answer generation process runs as an asynchronous job, with real-time status updates exposed to the frontend. Processing timestamps are normalised to IST (Indian Standard Time) for locale consistency[3]. Citation markers in the response are anchored directly to the source document passages used during retrieval, allowing users to verify factual accuracy and trace each claim back to its original context.
The Retrieval-Augmented Generation (RAG) pipeline leverages hybrid search combining BM25 keyword ranking with semantic vector similarity via WeaviateDB, enabling high-precision document retrieval even across heterogeneous corpora.
LiteLLM provides a unified interface for routing queries to GPT-5, Claude 4.5 Opus, and Gemini 3 Pro based on task classification, cost thresholds, and latency requirements, with automatic fallback on model degradation.
Asynchronous job processing via FastAPI background tasks ensures document indexing operations do not block user-facing API responses. Job status tracking is exposed via polling endpoints with IST-localised timestamps.
Practice QuickSort & Sorting Algorithms
DSA Tutor→Learn System Design Fundamentals
Chat Tutor→Explore Kubernetes via Document Q&A
Document Q&A→Redis & Caching Deep Dive
DSA Tutor→Take ML Concepts MCQ Test
MCQ Tests→AI-generated recommendations based on your results
Practice Similar Problems
Coding PracticeSharpen your skills with handpicked problems that match your weak areas — Arrays, Hashing, and Sliding Window.
Open Coding PracticeReview Weak Concepts
DSA TutorGet step-by-step AI explanations for Time Complexity and Dynamic Programming — your two lowest-scoring areas.
Go to DSA TutorTake an Adaptive MCQ Test
MCQ TestTest your understanding with an auto-generated adaptive quiz targeting your identified knowledge gaps.
Start MCQ TestChat with AI Tutor
AI Chat TutorHave a free-form conversation about today's results — ask follow-up questions or prep for your next interview.
Open AI ChatNext milestone: Level 8 — Expert Coder · 660 XP to go
+180 XP this session
Ready for your next challenge?
No comments yet. Be the first!