File tree Expand file tree Collapse file tree 8 files changed +110
-12
lines changed Expand file tree Collapse file tree 8 files changed +110
-12
lines changed Original file line number Diff line number Diff line change
1
+ import './App.css' ;
2
+ import Header from "./components/Header/Header"
3
+ import LeetcodeProblems from "./components/LeetcodeProblems/LeetcodeProblems"
1
4
function App ( ) {
2
5
return (
3
6
< div className = "App" >
4
-
7
+ < Header > </ Header >
8
+ < LeetcodeProblems > </ LeetcodeProblems >
5
9
</ div >
6
10
) ;
7
11
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ .header-container {
2
+ display : flex;
3
+ justify-content : center; /* Center the content horizontally */
4
+ align-items : center; /* Center the content vertically */
5
+ height : 100px ; /* Set a fixed height */
6
+ border-bottom : 2px solid black;
7
+ }
8
+
9
+ .logo {
10
+ width : 500px ; /* Set width as desired */
11
+ height : auto; /* Maintain aspect ratio */
12
+ }
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import Logo from "../../assets/CodeCrewLogo.png"
3
+ import './Header.css'
4
+
5
+ function Header ( ) {
6
+ return (
7
+ < div >
8
+ < div >
9
+ < header className = "header-container" >
10
+ < img src = { Logo } alt = "CodeCrewLogo" className = "logo" />
11
+ </ header >
12
+ </ div >
13
+ </ div >
14
+ )
15
+ }
16
+
17
+ export default Header
Original file line number Diff line number Diff line change
1
+ .container {
2
+ display : flex;
3
+ flex-direction : column;
4
+ align-items : center;
5
+ }
6
+
7
+ .title {
8
+ border : 1px solid # ccc ; /* Add border to title section */
9
+ padding : 20px ; /* Add padding for better spacing */
10
+ width : 80% ; /* Set a width to prevent it from stretching too wide */
11
+ box-sizing : border-box; /* Include padding and border in the width calculation */
12
+ margin-bottom : 20px ; /* Adjust as needed */
13
+ margin-top : 20px ;
14
+ }
15
+
16
+ .box-container {
17
+ display : flex;
18
+ justify-content : space-between;
19
+ width : 80% ; /* Set a width to prevent it from stretching too wide */
20
+ }
21
+
22
+ .content {
23
+ border : 1px solid # ccc ; /* Add border to content sections */
24
+ padding : 20px ; /* Add padding for better spacing */
25
+ width : calc (50% - 10px ); /* Set width for content sections */
26
+ box-sizing : border-box; /* Include padding and border in the width calculation */
27
+ }
28
+
29
+ # problemName {
30
+ text-align : center; /* Center the text within #problemName */
31
+ }
32
+
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import '../LeetcodeProblems/LeetcodeProblems.css' ;
3
+
4
+ function LeetcodeProblems ( ) {
5
+ return (
6
+ < div id = "problemContainer" class = "container" >
7
+ < div id = "problemName" class = "title" >
8
+ < h1 > Palindrome Number</ h1 >
9
+ </ div >
10
+ < div class = "box-container" >
11
+ < div id = "problemDescription" class = "content" >
12
+ Given an integer x, return true if x is a
13
+ palindrome
14
+ , and false otherwise.
15
+ </ div >
16
+ < div id = "problemExample" class = "content" >
17
+ Example 1:
18
+
19
+ Input: x = 121
20
+ Output: true
21
+ Explanation: 121 reads as 121 from left to right and from right to left.
22
+ < br > </ br >
23
+ Example 2:
24
+
25
+ Input: x = -121
26
+ Output: false
27
+ Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.
28
+ < br > </ br >
29
+ Example 3:
30
+
31
+ Input: x = 10
32
+ Output: false
33
+ Explanation: Reads 01 from right to left. Therefore it is not a palindrome.
34
+
35
+
36
+ </ div >
37
+ </ div >
38
+ </ div >
39
+
40
+
41
+ )
42
+ }
43
+
44
+ export default LeetcodeProblems
You can’t perform that action at this time.
0 commit comments