Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar

Adrian Statescu thinkphp

View GitHub Profile
@thinkphp
thinkphp / booking.js
Created June 15, 2025 06:57
Booking javascript
<script>
const properties = [
{
id: 1,
title: "Modern Downtown Apartment",
location: "New York, NY",
type: "apartment",
price: 150,
rating: 4.8,
@thinkphp
thinkphp / booking.html
Last active June 15, 2025 06:59
Booking HTML
<body>
<header class="header">
<nav class="nav">
<div class="logo">StayFinder</div>
<div class="search-bar">
<input type="text" class="search-input" placeholder="Where are you going?" id="searchLocation">
<input type="date" class="search-input" id="checkIn">
<input type="date" class="search-input" id="checkOut">
<input type="number" class="search-input" placeholder="Guests" min="1" max="12" id="guests">
<button class="search-btn" onclick="searchProperties()">🔍</button>
@thinkphp
thinkphp / booking.css
Created June 15, 2025 06:55
Booking Style CSS
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
@thinkphp
thinkphp / chicken-and-fox.c
Created June 14, 2025 18:45
Chicken-and-fox.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_ANIMALS 100
void generatePermutations(char* animals, int size, char result[][MAX_ANIMALS], int *count);
void swap(char*a, char *b);
void permute(char *arr, int start, int end, char result[][MAX_ANIMALS], int* count, int size);
void writeResultsToFile() {
@thinkphp
thinkphp / shortest-path-BFS.c
Created June 14, 2025 17:58
shortest-path-BFS.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_VERTICES 100
#define MAX_QUEUE_SIZE 100
//structura pentru elementele din coada
typedef struct {
int vertex;
int distance;
@thinkphp
thinkphp / Telecommunication-rivalitati.c
Created June 14, 2025 17:17
Telecommunications Rivalitati
/*
test case 1:
4
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
test case 2:
@thinkphp
thinkphp / asymmetrical.c
Last active June 14, 2025 16:04
asymmetrical.c
/*
Algoritmul pentru verificarea grafului asimetric
Conceptul de baza:
Un graf orientat este asimetric daca nu exista perechi simetrice de muchii. Adica, daca
exista o muchie de la nodul A la nodul B , nu trebuie sa existe o muchie de la nodul B la nodul A
@thinkphp
thinkphp / domino.c
Created June 13, 2025 18:40
problema 3. domino pieces
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
typedef struct {
int x1,
x2;
} Domino;
@thinkphp
thinkphp / connectedNode.c
Created June 13, 2025 17:53
probleme 2 . Connected Nodes
#include <stdio.h>
#include <malloc.h>
void DFSHelper(int **graph, int node, int n, int *visited, int * connectedNodes, int *count) {
visited[ node ] = 1;
connectedNodes[ (*count)++ ] = node;
for(int neighbor = 0; neighbor < n; neighbor++) {
@thinkphp
thinkphp / matrix_div_k.c
Created June 13, 2025 17:03
matrix_div_k.c
#include <stdio.h>
#include <malloc.h>
int sumDivisibleRecursiveAlt(int **matrix, int k, int index, int n) {
if(index >= n * n) {
return 0;
}