原创 通過虛函數表調用虛函數與通過虛函數表(繞過訪問權限控制)

一、背景知識           在講解虛函數的時候,我們知道,如果類中有虛函數,則該類中存在一個虛函數表(V-Table),每個該類的對象都會有一個指針指向該虛函數表,存儲這類中虛函數的函數指針,而虛函數表的地址就存在該類對象內存的開始

原创 Permutation Sequence

The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in o

原创 3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Re

原创 4Sum

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all

原创 interprocess communication (IPC) 進程間通信

signals, which are used to indicate that an event has occurred; pipes (familiar to shell users as the | operator) andFI

原创 Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operatio

原创 3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets

原创 Permutations

Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations

原创 Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

原创 print系列函數(formatted output conversion)

printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf             #include <stdio.h>        int p

原创 Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it wo

原创 Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,