Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
## Full stack assignment
<h1>Leetcode</h1>

<ol>
<li>Problem Repository: Browse and search a wide range of coding problems categorized by topics and difficulty levels.</li>

### Video

Link to video - https://www.youtube.com/watch?v=569YZm0X5-0

### Where to start?
Look at App.jsx inside the src/ folder
</ol>
<h2>Technologies Used</h2>
<ul>
<li>Front-end: HTML, CSS, JavaScript, React</li>
</ul>
<h2>Getting Started</h2>
<ol>
<li>Clone the repository: <code>git clone t</code></li>
<li>Navigate to the project directory: <code>cd leetcode-clone</code></li>
<li>Install the dependencies: <code>npm install</code></li>

<li>Start the development server: <code>npm start</code></li>
<li>Access the application in your browser at <code>http://localhost:3000</code>.</li>
</ol>
<h2>Contributing</h2>
<p>Contributions are welcome! If you would like to contribute to this project, please follow these steps:</p>
<ol>
<li>Fork the repository.</li>
<li>Create a new branch: <code>git checkout -b feature/your-feature</code></li>
<li>Make your changes and commit them: <code>git commit -m 'Add your feature'</code></li>
<li>Push to the branch: <code>git push origin feature/your-feature</code></li>
<li>Open a pull request and describe your changes.</li>
</ol>
28 changes: 18 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>LeetCode By Sree</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"></script>
</body>

</html>
63 changes: 62 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-router-dom": "^6.11.2"
},
"devDependencies": {
"@types/react": "^18.0.28",
Expand Down
42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

75 changes: 21 additions & 54 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,26 @@
/*
* Temporary problems array schema
*/
const problems = [{
title: "201. Bitwise AND of Numbers Range",
difficulty: "Medium",
acceptance: "42%"
},{
title: "201. Bitwise AND of Numbers Range",
difficulty: "Medium",
acceptance: "412%"
},
{
title: "202. Happy Number",
difficulty: "Easy",
acceptance: "54.9%"
},
{
title: "203. Remove Linked List Elements",
difficulty: "Hard",
acceptance: "42%"
}];


function App() {

/* Add routing here, routes look like -
/login - Login page
/signup - Signup page
/problemset/all/ - All problems (see problems array above)
/problems/:problem_slug - A single problem page
*/
import React from 'react'
import { Route, Routes } from 'react-router-dom';
import HomePage from './containers/HomePage';
import Layout from './Layout/Layout';
import Login from './containers/Auth/Login';
import Pagenotfound from './containers/Pagenotfound';
import Register from './containers/Auth/Register';
import AllProblems from './containers/AllProblems';
import Problem from './containers/Problem';

const App = () => {
return (
<div>
Finish the assignment! Look at the comments in App.jsx as a starting point
</div>
)
<>
<Routes>
<Route path='/' element={<HomePage />} />
<Route path='/login' element={<Login />} />
<Route path='/register' element={<Register />} />
<Route path='/all-problems' element={<AllProblems />} />
<Route path='/problem/:id' element={<Problem />} />
<Route path='*' element={<Pagenotfound />} />
</Routes>
</>
)
}

// A demo component
function ProblemStatement(props) {
const title = props.title;
const acceptance = props.acceptance;
const difficulty = props.difficulty;

return <tr>
<td>
{title}
</td>
<td>
{acceptance}
</td>
<td>
{difficulty}
</td>
</tr>
}
export default App
17 changes: 17 additions & 0 deletions src/Layout/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import { Link } from 'react-router-dom';

const Footer = () => {
return (
<div className='footer'>
<h4 className='text-center'>All Right's Reserved &copy; Sree </h4>
<p className='text-center mt-3' >
<Link to='/about' className='m-2'>About</Link> |
<Link to='/contact' className='m-2'>Contact</Link> |
<Link to='/policy' className='m-2'>Privacy Policy</Link>
</p>
</div>
);
};

export default Footer;
18 changes: 18 additions & 0 deletions src/Layout/Layout.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import Footer from '../Layout/Footer'
import HomePage from '../containers/HomePage'
import Header from '../containers/Header'

const Layout = ({ children }) => {
return (
<div>
<Header headerVisible={true} />
<main style={{ minHeight: '77vh' }}>{children}</main>

<Footer />

</div >
)
}

export default Layout
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

Loading