+ );
+};
+
+export default Marquee;
diff --git a/cpsquad/app/blogs/blogData.js b/cpsquad/app/blogs/blogData.js
new file mode 100644
index 0000000..1439653
--- /dev/null
+++ b/cpsquad/app/blogs/blogData.js
@@ -0,0 +1,407 @@
+export const blogPosts = [
+ {
+ id: 1,
+ title: "Getting Started with Competitive Programming",
+ excerpt: "A comprehensive guide for beginners to start their competitive programming journey. Learn about the essential platforms, practice strategies, and fundamental algorithms.",
+ content: `
+
Introduction
+
Competitive programming is an exciting field that combines problem-solving skills with algorithmic thinking. Whether you're a complete beginner or looking to improve your skills, this guide will help you get started on the right track.
+
+
Essential Platforms
+
Here are the most popular platforms to begin your journey:
+
+
Codeforces: One of the most popular platforms with regular contests and a great community.
+
AtCoder: Known for high-quality problems and excellent editorials.
+
LeetCode: Perfect for interview preparation and building fundamentals.
+
CodeChef: Offers long challenges and shorter contests.
+
+
+
Practice Strategy
+
Consistency is key in competitive programming. Here's a structured approach:
+
+
Start with easy problems to build confidence
+
Focus on understanding algorithms rather than memorizing
+
Participate in virtual contests to simulate real conditions
+
Review editorials and learn from others' solutions
+
+
+
Fundamental Algorithms
+
Master these core concepts first:
+
+
Time and space complexity analysis
+
Basic data structures (arrays, stacks, queues)
+
Sorting algorithms
+
Binary search
+
Two pointers technique
+
+
+
Conclusion
+
Remember, competitive programming is a marathon, not a sprint. Stay consistent, practice regularly, and don't get discouraged by difficult problems. Join our CP Squad community for support and motivation!
+ `,
+ author: "Alex Chen",
+ date: "Oct 15, 2024",
+ readTime: "8 min read",
+ category: "Tutorial",
+ tags: ["Beginner", "CP", "Algorithms"],
+ },
+ {
+ id: 2,
+ title: "Dynamic Programming Patterns Every CP Should Know",
+ excerpt: "Master the most common dynamic programming patterns used in competitive programming contests. From knapsack to digit DP, we cover it all.",
+ content: `
+
Introduction to Dynamic Programming
+
Dynamic Programming (DP) is one of the most important techniques in competitive programming. It's used to solve optimization problems by breaking them down into simpler subproblems.
+
+
1. Linear DP
+
The simplest form of DP where the state depends on previous states in a linear fashion.
Used for optimization problems involving selecting items with constraints.
+
+
0/1 Knapsack: Each item can be taken at most once
+
Unbounded Knapsack: Items can be taken multiple times
+
Bounded Knapsack: Each item has a limited quantity
+
+
+
3. Interval DP
+
Problems involving intervals or ranges, often solved by considering all possible ways to divide the interval.
+
// Example: Matrix Chain Multiplication
+dp[i][j] = min(dp[i][k] + dp[k+1][j] + cost(i,k,j)) for all k
+
+
4. Tree DP
+
DP on trees where we compute values for subtrees and combine them.
+
+
Root the tree at any node
+
Compute DP values for children first
+
Combine children's values to get parent's value
+
+
+
5. Digit DP
+
Used for problems involving constraints on digits of numbers.
+
State usually includes: current position, tight constraint, and problem-specific parameters.
+
+
Practice Problems
+
Start with these classic problems:
+
+
Coin Change (Linear DP)
+
Longest Increasing Subsequence (Linear DP)
+
0/1 Knapsack (Knapsack DP)
+
Matrix Chain Multiplication (Interval DP)
+
Tree Diameter (Tree DP)
+
+ `,
+ author: "Sarah Kim",
+ date: "Oct 12, 2024",
+ readTime: "12 min read",
+ category: "Algorithm",
+ tags: ["DP", "Advanced", "Patterns"],
+ },
+ {
+ id: 3,
+ title: "CP Squad's First Hackathon: A Huge Success!",
+ excerpt: "Recap of our inaugural 48-hour hackathon where teams built innovative solutions to real-world problems. Amazing projects and great collaboration!",
+ content: `
+
Event Overview
+
Last weekend, CP Squad organized its first-ever 48-hour hackathon, and what an incredible experience it was! Over 150 participants from various universities came together to collaborate, innovate, and compete.
+
+
The Challenge Themes
+
We had four main tracks for participants to choose from:
+
+
Education Technology: Solutions to improve learning experiences
+
Healthcare Innovation: Tech solutions for healthcare challenges
+
Environmental Sustainability: Apps and tools for environmental awareness
+
Social Impact: Technology for social good
+
+
+
Winning Projects
+
🥇 First Place: EcoTracker
+
A mobile app that gamifies environmental conservation by tracking daily eco-friendly activities and connecting users with local environmental initiatives.
+
+
🥈 Second Place: MedAssist AI
+
An AI-powered healthcare assistant that helps patients manage medications and provides symptom tracking with intelligent recommendations.
+
+
🥉 Third Place: CodeMentor
+
A peer-to-peer learning platform specifically designed for competitive programming, featuring real-time collaboration and mentorship matching.
+
+
Event Highlights
+
+
42 teams registered and completed projects
+
Amazing keynote from Google software engineer
+
24/7 mentorship from industry professionals
+
Pizza, energy drinks, and lots of coffee!
+
Networking sessions with tech companies
+
+
+
Community Impact
+
The hackathon wasn't just about competition—it was about building our community. We saw incredible collaboration between students from different backgrounds and skill levels. Many participants formed lasting friendships and even started working on projects together beyond the event.
+
+
What's Next?
+
Based on the overwhelming positive feedback, we're already planning our next hackathon for spring 2025. Stay tuned for more details!
+
+
Special thanks to our sponsors: TechCorp, InnovateNow, and CodeBase Inc. for making this event possible.
+ `,
+ author: "Mike Johnson",
+ date: "Oct 10, 2024",
+ readTime: "5 min read",
+ category: "Event",
+ tags: ["Hackathon", "Community", "Projects"],
+ },
+ {
+ id: 4,
+ title: "Graph Theory: From Basics to Advanced Techniques",
+ excerpt: "Deep dive into graph algorithms essential for competitive programming. Cover BFS, DFS, shortest paths, and advanced topics like network flows.",
+ content: `
+
Introduction to Graph Theory
+
Graph theory is fundamental to competitive programming. Understanding graphs and their algorithms is crucial for solving many complex problems efficiently.
+
+
Graph Representation
+
Adjacency List
+
vector> adj(n);
+adj[u].push_back(v); // Add edge u -> v
+
+
Adjacency Matrix
+
vector> adj(n, vector(n, 0));
+adj[u][v] = 1; // Add edge u -> v
+
+
Basic Traversal Algorithms
+
Depth-First Search (DFS)
+
Used for exploring graphs, finding connected components, and detecting cycles.
For single-source shortest paths with non-negative weights.
+
+
Bellman-Ford Algorithm
+
Handles negative weights and detects negative cycles.
+
+
Floyd-Warshall Algorithm
+
All-pairs shortest paths for small graphs.
+
+
Advanced Topics
+
Minimum Spanning Tree
+
+
Kruskal's Algorithm: Sort edges and use Union-Find
+
Prim's Algorithm: Greedy approach with priority queue
+
+
+
Network Flows
+
+
Maximum Flow: Ford-Fulkerson, Edmonds-Karp
+
Minimum Cut: Max-flow min-cut theorem
+
Bipartite Matching: Special case of maximum flow
+
+
+
Practice Strategy
+
+
Master basic traversal algorithms first
+
Solve shortest path problems
+
Practice MST and topological sorting
+
Move to advanced topics like flows
+
+ `,
+ author: "Emma Davis",
+ date: "Oct 8, 2024",
+ readTime: "15 min read",
+ category: "Algorithm",
+ tags: ["Graphs", "Advanced", "Theory"],
+ },
+ {
+ id: 5,
+ title: "Interview with ICPC World Finalist",
+ excerpt: "Exclusive interview with our club alumnus who made it to the ICPC World Finals. Learn about their journey, preparation strategies, and advice.",
+ content: `
+
Meet Our Champion
+
Today we're interviewing Alex Rodriguez, a CP Squad alumnus who recently competed at the ICPC World Finals in Dhaka, Bangladesh. Alex's team finished in the top 20 globally!
+
+
The Journey to World Finals
+
Q: Tell us about your path to the World Finals.
+
Alex: It started three years ago when I joined CP Squad as a freshman. I was intimidated at first—everyone seemed so much better than me. But the club's supportive environment helped me improve rapidly. We practiced together every week, participated in local contests, and gradually worked our way up through regionals.
+
+
Q: What was the most challenging part of your preparation?
+
Alex: Team coordination was harder than individual skill development. In ICPC, you have three people sharing one computer, so you need to strategize who codes what and when. We spent months perfecting our teamwork and communication.
+
+
Preparation Strategy
+
Q: How did you structure your practice routine?
+
Alex: We had a systematic approach:
+
+
Individual practice: 2-3 hours daily on platforms like Codeforces and AtCoder
+
Team practice: 3 mock contests per week using past ICPC problems
+
Topic focus: One week dedicated to specific algorithms (DP, graphs, geometry)
+
Contest analysis: Detailed review of every contest we participated in
+
+
+
The World Finals Experience
+
Q: How was the actual World Finals?
+
Alex: Incredible and nerve-wracking! The competition hall was massive, with teams from 60+ countries. The problems were extremely challenging—we solved 5 out of 12, which was enough for a decent ranking. The atmosphere was electric, and meeting competitors from around the world was inspiring.
+
+
Advice for Current Students
+
Q: What advice would you give to current CP Squad members?
+
Alex: Several key points:
+
+
Start early: The earlier you begin, the more time you have to develop skills
+
Practice consistently: Daily practice beats occasional marathon sessions
+
Learn from failures: Every wrong submission teaches you something
+
Build a team early: Team chemistry takes time to develop
+
Enjoy the process: The journey is more important than the destination
+
+
+
Looking Ahead
+
Q: What's next for you?
+
Alex: I'm starting my software engineering career at Microsoft, but I'll stay involved with CP Squad as a mentor. I want to help the next generation of competitive programmers achieve their goals.
+
+
Final words: "Believe in yourself and trust the process. Every great competitive programmer started as a beginner. With dedication and the right community support, amazing things are possible!"
+ `,
+ author: "David Wilson",
+ date: "Oct 5, 2024",
+ readTime: "10 min read",
+ category: "Interview",
+ tags: ["ICPC", "Success Story", "Inspiration"],
+ },
+ {
+ id: 6,
+ title: "Building a Study Plan for Competitive Programming",
+ excerpt: "Structure your learning with our proven study plan. From daily practice routines to contest strategies, maximize your CP growth.",
+ content: `
+
Why You Need a Study Plan
+
Random practice without structure leads to plateaus. A well-designed study plan ensures consistent progress and covers all essential topics systematically.
+
+
Phase 1: Foundation Building (Months 1-3)
+
Week 1-4: Programming Fundamentals
+
+
Master your chosen programming language (C++/Java/Python)
+
Learn STL/Collections thoroughly
+
Practice basic I/O operations
+
Solve 100+ easy problems on any platform
+
+
+
Week 5-8: Basic Algorithms
+
+
Sorting algorithms (merge sort, quick sort)
+
Binary search and its variations
+
Two pointers technique
+
Basic string algorithms
+
+
+
Week 9-12: Data Structures
+
+
Arrays and matrices
+
Stacks and queues
+
Priority queues/heaps
+
Sets and maps
+
+
+
Phase 2: Intermediate Topics (Months 4-8)
+
Dynamic Programming
+
+
Classical DP problems (knapsack, LIS, LCS)
+
DP on grids
+
Interval DP
+
Digit DP
+
+
+
Graph Algorithms
+
+
DFS and BFS
+
Shortest path algorithms
+
Minimum spanning tree
+
Topological sorting
+
+
+
Number Theory
+
+
Prime numbers and sieve
+
GCD and LCM
+
Modular arithmetic
+
Fast exponentiation
+
+
+
Phase 3: Advanced Topics (Months 9+)
+
+
Advanced DP (tree DP, bitmask DP)
+
Network flows
+
Segment trees and Fenwick trees
+
String algorithms (KMP, Z-algorithm)
+
Computational geometry
+
+
+
Daily Routine
+
Weekdays (2-3 hours)
+
+
30 min: Review previous day's topics
+
60 min: Learn new concept/algorithm
+
60 min: Solve 2-3 problems on the topic
+
30 min: Read editorials and alternative solutions
+
+
+
Weekends (4-5 hours)
+
+
Participate in online contests
+
Solve harder problems from contest archives
+
Review and analyze contest performance
+
+
+
Contest Strategy
+
+
Read all problems first (15-20 minutes)
+
Solve easiest problems first
+
Implement carefully to avoid debugging
+
Manage time wisely - don't get stuck on one problem
+
Submit often - partial points are better than no points
+
+
+
Tracking Progress
+
+
Maintain a practice log
+
Track rating progress on platforms
+
Record contest performances
+
Identify weak areas for focused practice
+
+
+
Resources
+
+
Books: "Competitive Programming" by Steven Halim
+
Platforms: Codeforces, AtCoder, CSES Problem Set
+
Visualization: VisuAlgo for algorithm visualization
+
Community: Join CP Squad's Discord for discussions!
+
+ `,
+ author: "Lisa Zhang",
+ date: "Oct 2, 2024",
+ readTime: "7 min read",
+ category: "Tutorial",
+ tags: ["Study Plan", "Practice", "Strategy"],
+ },
+];
+
+export const categories = ["all", "tutorial", "algorithm", "event", "interview"];
\ No newline at end of file
diff --git a/cpsquad/app/blogs/page.js b/cpsquad/app/blogs/page.js
new file mode 100644
index 0000000..8c782fe
--- /dev/null
+++ b/cpsquad/app/blogs/page.js
@@ -0,0 +1,228 @@
+"use client";
+
+import { useState } from "react";
+import { motion } from "framer-motion";
+import BlogPost from "./BlogPost";
+import BlogCard from "./BlogCard";
+import FilterDropdown from "./FilterDropdown";
+import Marquee from "./Marquee";
+import { blogPosts, categories } from "./blogData";
+
+export default function BlogsPage() {
+ const [currentFilter, setCurrentFilter] = useState("all");
+ const [selectedBlog, setSelectedBlog] = useState(null);
+ const [showFullPost, setShowFullPost] = useState(false);
+
+ const handleReadMore = (blog) => {
+ setSelectedBlog(blog);
+ setShowFullPost(true);
+ };
+
+ const handleBackToBlogs = () => {
+ setShowFullPost(false);
+ setSelectedBlog(null);
+ };
+
+ const filteredBlogs = currentFilter === "all"
+ ? blogPosts
+ : blogPosts.filter(blog => blog.category.toLowerCase() === currentFilter);
+
+ // Show full blog post if selected
+ if (showFullPost && selectedBlog) {
+ return ;
+ }
+
+ return (
+