C++进阶
v_v...
这个作者很懒,什么都没留下…
展开
-
c++大整数的表示及应用
大家知道在c++中经常会出现整数溢出的情况。如果运算结果真的很大,就需要用到所谓的高精度算法,即用数组来存储整数,并模拟手算的方法进行四则运算。下面介绍的方法是,将一个大整数,封装成struct,用的时候,跟int用法一样。#include <iostream>#include <stdio.h>#include <string.h>#include <v...原创 2018-07-16 11:40:40 · 5898 阅读 · 0 评论 -
C++与STL入门
今天学的一点C++知识 1.c++版本框架: c++头文件: stdio.h -> cstdio string -> cstring math.h -> cmath ctype.h -> cctype c++ 程序 加 using namespace std; 这句话 这个是什么意思呢? C++中有一个“名称空间”(namespace)的概念,...原创 2018-07-27 14:53:16 · 992 阅读 · 0 评论 -
LeetCode - Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dea...原创 2018-08-06 15:16:58 · 85 阅读 · 0 评论 -
Leetcode - Merge Two Sorted List
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1->2->4, 1->3->4 Output: 1-...原创 2018-08-06 21:20:17 · 137 阅读 · 0 评论 -
LeetCode - Same Tree 100
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value. Example ...原创 2018-08-12 12:01:55 · 168 阅读 · 0 评论