dengxinyi hace 6 años
padre
commit
95c07502a3
Se han modificado 1 ficheros con 33 adiciones y 0 borrados
  1. 33 0
      hard/352.data-stream-as-disjoint-intervals.go

+ 33 - 0
hard/352.data-stream-as-disjoint-intervals.go

@@ -0,0 +1,33 @@
+/**
+ * Definition for an interval.
+ * type Interval struct {
+ *	   Start int
+ *	   End   int
+ * }
+ */
+type SummaryRanges struct {
+	intervals []Interval
+}
+
+/** Initialize your data structure here. */
+func Constructor() SummaryRanges {
+	return SummaryRanges{}
+}
+
+func (this *SummaryRanges) AddNum(val int) {
+	beg, end := 0, len(this.intervals)
+	for beg < end {
+		
+	}
+}
+
+func (this *SummaryRanges) GetIntervals() []Interval {
+	
+}
+
+/**
+ * Your SummaryRanges object will be instantiated and called as such:
+ * obj := Constructor();
+ * obj.AddNum(val);
+ * param_2 := obj.GetIntervals();
+ */