|
| 1 | +import { Badge } from "@/components/ui/badge"; |
| 2 | +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; |
| 3 | + |
| 4 | +export default function QuestionComponent() { |
| 5 | + const difficultyMapping = { |
| 6 | + Hard: "bg-red-900 text-black", |
| 7 | + Medium: "bg-yellow-900 text-black", |
| 8 | + Easy: "bg-green-900 text-black", |
| 9 | + }; |
| 10 | + |
| 11 | + return ( |
| 12 | + <Card className="h-full flex flex-col bg-stone-900 border-black"> |
| 13 | + {/* Criteria */} |
| 14 | + <CardHeader> |
| 15 | + <CardTitle className="text-white text-4xl">Two Sum</CardTitle> |
| 16 | + <div className="flex pt-5 items-start gap-2"> |
| 17 | + <Badge className="bg-red-900 text-black">Difficult</Badge> |
| 18 | + </div> |
| 19 | + </CardHeader> |
| 20 | + |
| 21 | + <CardContent className="flex flex-col flex-1"> |
| 22 | + {/* Question Description */} |
| 23 | + <div className="flex-1 text-white"> |
| 24 | + Description : We, the citizens of Singapore, pledge ourselves as one |
| 25 | + united people, regardless of race, language or religion, to build a |
| 26 | + democratic society based on justice and equality so as to achieve |
| 27 | + happiness, prosperity and progress for our nation. |
| 28 | + </div> |
| 29 | + |
| 30 | + {/* Examples Section */} |
| 31 | + <div className="flex-1 mt-5 p-2 bg-black text-white rounded-lg text-sm"> |
| 32 | + Input : Test case 1 Output : Correct answer Explanation : Because it |
| 33 | + is correct |
| 34 | + </div> |
| 35 | + |
| 36 | + {/* Constraints Section */} |
| 37 | + <div className="mt-5 p-2 flex-1 text-white"> |
| 38 | + 1 is less than n There will be a total of 1 trillion test cases |
| 39 | + </div> |
| 40 | + </CardContent> |
| 41 | + </Card> |
| 42 | + ); |
| 43 | +} |
0 commit comments