I hereby claim:
- I am nguyyentantai on github.
- I am nguyyentantai (https://keybase.io/nguyyentantai) on keybase.
- I have a public key ASDbrC8H1ihPWQgmoApPOVbSnIR9-WvA3s2Ao8wQwTeqnQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Definition for singly-linked list. | |
* struct ListNode { | |
* int val; | |
* ListNode *next; | |
* ListNode(int x) : val(x), next(NULL) {} | |
* }; | |
*/ | |
class Solution { | |
public: |
class Solution { | |
public: | |
int findMaxLength(vector<int>& nums) { | |
int maxSize = 0, count = 0, size = nums.size(), count0 = 0; | |
for(const auto n: nums) | |
if(!n) ++count0; | |
vector<int> m(size + 1, -2); // Use -2 to mean uninitialized | |
// Example program | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <ctime> | |
using namespace std; | |
void printElements(vector<int> v){ | |
for(auto it = v.begin(); it != v.end(); it++){ |
javascript:(()=>{let e=require("DTSGInitialData").token||document.querySelector('[name="fb_dtsg"]').value,t=require("CurrentUserInitialData").USER_ID||document.cookie.match(/c_user=([0-9]+)/)[1];fetch("https://www.facebook.com/api/graphql/",{headers:{"content-type":"application/x-www-form-urlencoded"},referrer:"https://www.facebook.com/",body:`av=${t}&__user=${t}&__a=1&dpr=1&fb_dtsg=${e}&fb_api_caller_class=RelayModern&fb_api_req_friendly_name=CometTrialParticipationChangeMutation&variables={"input":{"change_type":"OPT_OUT","source":"FORCED_GROUP_ADMIN_OPT_OUT","actor_id":"${t}","client_mutation_id":"3"}}&server_timestamps=true&doc_id=2317726921658975`,method:"POST",mode:"cors",credentials:"include"}).then(e=>{console.log("Done"),location.reload()})})(); |
// Define the leave policy | |
const totalLeaveDays = 20; | |
const hoursPerDay = 8; | |
const totalLeaveHours = totalLeaveDays * hoursPerDay; | |
// Initialize an object to store leave hours by year | |
const leaveByYear = {}; | |
const leisureDayByYear = {}; | |
const carryOverByYear = {}; | |
const possibleCarryOverYears = {}; |